Skip to content

Commit

Permalink
fix fail test
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghuaiyuan committed Jan 20, 2025
1 parent 2741799 commit e424e1f
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ public void testDoNormalTimer() throws Exception {
String topic = "TimerRocksdbTest_testPutTimerMessage";

final TimerMessageRocksDBStore timerMessageStore = createTimerMessageRocksDBStore(null);
timerMessageStore.createTimer(RocksDB.DEFAULT_COLUMN_FAMILY);
timerMessageStore.load();
timerMessageStore.start();
long commitOffset = timerMessageStore.getCommitOffset();
Expand Down Expand Up @@ -234,7 +233,6 @@ public void testPutExpiredTimerMessage() throws Exception {
String topic = "TimerRocksdbTest_testPutExpiredTimerMessage";

TimerMessageRocksDBStore timerMessageStore = createTimerMessageRocksDBStore(null);
timerMessageStore.createTimer(RocksDB.DEFAULT_COLUMN_FAMILY);
timerMessageStore.load();
timerMessageStore.start();

Expand All @@ -260,11 +258,10 @@ public void testDeleteTimerMessage() throws Exception {
String topic = "TimerRocksdbTest_testDeleteTimerMessage";

TimerMessageRocksDBStore timerMessageStore = createTimerMessageRocksDBStore(null);
timerMessageStore.createTimer(RocksDB.DEFAULT_COLUMN_FAMILY);
timerMessageStore.load();
timerMessageStore.start();

long delayMs = System.currentTimeMillis() + 2000;
long delayMs = System.currentTimeMillis() + 4000;
String uniqKey = null;
for (int i = 0; i < 5; i++) {
MessageExtBrokerInner inner = buildMessage(delayMs, topic, false);
Expand All @@ -283,7 +280,7 @@ public void testDeleteTimerMessage() throws Exception {

// The first one should have been deleted.
for (int i = 0; i < 4; i++) {
ByteBuffer msgBuff1 = getOneMessage(topic, 0, i, 3000);
ByteBuffer msgBuff1 = getOneMessage(topic, 0, i, 4000);
assertNotNull(msgBuff1);
MessageExt msgExt = MessageDecoder.decode(msgBuff1);
assertNotNull(msgExt);
Expand All @@ -298,7 +295,6 @@ public void testPutDeleteTimerMessage() throws Exception {
String topic = "TimerRocksdbTest_testPutDeleteTimerMessage";

final TimerMessageRocksDBStore timerMessageStore = createTimerMessageRocksDBStore(null);
timerMessageStore.createTimer(RocksDB.DEFAULT_COLUMN_FAMILY);
timerMessageStore.load();
timerMessageStore.start();

Expand Down

0 comments on commit e424e1f

Please sign in to comment.