From 5a675f9ef656c591ed95ec947c0fe886ea713426 Mon Sep 17 00:00:00 2001 From: wanghuaiyuan Date: Mon, 20 Jan 2025 22:02:28 +0800 Subject: [PATCH] fix fail test --- .../timer/rocksdb/TimerMessageRocksDBStoreTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/store/src/test/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStoreTest.java b/store/src/test/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStoreTest.java index 789bd73fd7a..d257dd3c269 100644 --- a/store/src/test/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStoreTest.java +++ b/store/src/test/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStoreTest.java @@ -282,11 +282,12 @@ public void testDeleteTimerMessage() throws Exception { assertEquals(PutMessageStatus.PUT_OK, messageStore.putMessage(delMsg).getPutMessageStatus()); // The first one should have been deleted. - ByteBuffer msgBuff = getOneMessage(topic, 0, 0, 3000); - assertNotNull(msgBuff); - MessageExt msgExt = MessageDecoder.decode(msgBuff); - assertNotNull(msgExt); - + for (int i = 1; i < 4; i++) { + ByteBuffer msgBuff = getOneMessage(topic, 0, i, 3000); + assertNotNull(msgBuff); + MessageExt msgExt = MessageDecoder.decode(msgBuff); + assertNotNull(msgExt); + } // The last one should be null. assertNull(getOneMessage(topic, 0, 4, 500)); timerMessageStore.shutdown();