rezataroosheh commented on PR #13639:
URL: https://github.com/apache/ignite/pull/13639#issuecomment-6218242364

   Thank you @zstan for review and feedback.
   You're right, gridCnt != 0 without a working ignite-clock thread doesn't 
happen. The frozen state is actually gridCnt == 0 with no clock at all:
   
   1. A test leaves nodes running (e.g. ScriptTestSuite).
   2. GridAbstractTest's static initializer runs while those nodes are still 
alive. Since gridCnt != 0, the test clock is not started; only their 
ignite-clock is running.
   3. stopAllGrids() in @AfterAll of GridCommonAbstractWrapperTest stops all 
nodes in the JVM, including the leaked ones. gridCnt drops to 0 and 
ignite-clock stops.
   4. Now nothing updates the time, so U.currentTimeMillis() is frozen.
   
   I've reworked the fix without the flag, and CommonUtils is no longer changed:
   - GridAbstractTest always starts the test clock.
   - When the test clock starts, it stops an ignite-clock that is already 
running and takes its usual gridCnt slot, as before.
   
   So there's always exactly one clock, and it's the test one. 
IgniteClockTimerTest emulates the leaked-node case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to