Conversation
Remove the 100ms Thread.sleep from EventCorrelatorTest. This test does not appear to involve asynchronous or threaded operations, so there is no synchronization primitive to replace the sleep with in this case. The original test implementation used Joda DateTime and relied on the delay to ensure distinct timestamps. The implementation now uses OffsetDateTime, which provides finer timestamp precision, remaining distinct without the artificial delay.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: flrnd The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
|
|
Welcome @flrnd! |
Notes
Remove the 100ms
Thread.sleepfromEventCorrelatorTest.This test does not appear to involve asynchronous or threaded operations, so there is no synchronization primitive to replace the sleep with in this case.
The original test implementation used
Joda DateTimeand relied on the delay to ensure distinct timestamps.The implementation now uses
OffsetDateTime, which provides finer timestamp precision, remaining distinct without the artificial delay.Verification
The test was run locally 100 times with
Thread.sleep(100)removed. ConsecutiveOffsetDateTime.now()calls remained distinct, with observed differences below 1 ms, andEventCorrelatorTestcontinued to pass.