Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
RuntimeClock has a concept of injectable timer, and in many unit tests, we use LogicalTimer to speed up the operations. Unfortunately, RuntimeClock still depends on the system timer internally: it uses Object.wait(time) calls in the event loop. That can cause race conditions when using LogicalTimer, e.g. in unit test ClockTest.testAlarmOrder()
The solution would be to move the .wait() functionality into the logical timer and use that inside the RuntimeClock.