Skip to content

Commit 719e4ec

Browse files
committed
[FLUSS-1855][server] Improved Assertions for TimerTaskEntryList Null-Safety
1 parent 66745c8 commit 719e4ec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fluss-server/src/test/java/org/apache/fluss/server/utils/timer/TimerTaskEntryTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ void testRemoveEnsuresCurrentListNullSafety() throws InterruptedException {
109109
removalThread.join();
110110
additionThread.join();
111111

112+
// Attempt to remove the last entry (to ensure empty list)
113+
entry.remove();
114+
115+
// Verify the list is empty after entry removal and ensure
116+
// counter reflects the correct state
117+
assertThat(entry.list).isNull();
118+
assertThat(sharedTaskCounter.get()).isEqualTo(0);
119+
112120
// Assert that no exception was originated
113121
assertThat(thrownException.get()).isNull();
114122
}

0 commit comments

Comments
 (0)