File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
fluss-server/src/test/java/org/apache/fluss/server/utils/timer Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -75,15 +75,20 @@ void testRemoveEnsuresCurrentListNullSafety() throws InterruptedException {
7575 try {
7676 // Wait for the initial removal to complete
7777 latch .await ();
78- // Add the entry from our separate list while the removal thread is
78+ // Add the entry to our separate list while the removal thread is
7979 // still verifying the condition (resulting in our null list within
8080 // the internal removal call, and our exception)
8181 for (int i = 0 ; i < 10000 ; i ++) {
8282 // Determine which list to add to the task
8383 // (backwards-oscillation)
84- if (entry .list == null ) {
84+ TimerTaskList currentList = entry .list ;
85+ if (currentList == null || currentList == primaryList ) {
86+ // If the entry is not in any list or in the primary list,
87+ // move it to the secondary list
8588 secondaryList .add (entry );
86- } else if (entry .list == secondaryList ) {
89+ } else if (currentList == secondaryList ) {
90+ // If the entry is in the secondary list, move it to the
91+ // primary list
8792 primaryList .add (entry );
8893 }
8994 Thread .yield ();
You can’t perform that action at this time.
0 commit comments