Repository navigation
Commit 9f9dcc7
committed
fix(tests): make EventCorrelatorTest timestamps deterministic
Avoid relying on Thread.sleep(100) to produce distinct timestamps.
The sleep was removed because the test only requires timestamp ordering,
not elapsed time. However, the Windows Bazel build showed that
OffsetDateTime.now() can return identical timestamps in consecutive calls
depending on the environment clock resolution.
Advance the timestamp explicitly instead, keeping the test deterministic
across different platforms.1 parent 0ec504c commit 9f9dcc7
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
147 | 148 | | |
148 | | - | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
| 156 | + | |
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
| |||
0 commit comments