From f18d8a65ccd400e8ab188156b70ac545b3d105f4 Mon Sep 17 00:00:00 2001 From: liudezhi Date: Fri, 29 Nov 2024 14:05:44 +0800 Subject: [PATCH] add 404 test --- .../apache/pulsar/broker/admin/AdminApiMultiBrokersTest.java | 5 +++++ 1 file changed, 5 insertions(+) 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); + } } }