diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiMultiBrokersTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiMultiBrokersTest.java index 5542f23d5e9f9..0cb4fe6590918 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiMultiBrokersTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiMultiBrokersTest.java @@ -147,5 +147,10 @@ public void testTopicGetMessageIdByTimestamp() throws Exception { MessageId msgId = admin.topics().getMessageIdByTimestamp(topic + "-partition-0", System.currentTimeMillis()); Assert.assertNotNull(msgId); + try { + admin.topics().getMessageIdByTimestamp(topic + "-partition-1", System.currentTimeMillis()); + } catch (Exception e) { + Assert.assertEquals(e.getClass(), PulsarAdminException.NotFoundException.class); + } } }