You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make PartitionFlowSpec deterministic under the poll gates (evolution-gaming#886)
Five tests failed intermittently, 113-168 times per 200 iterations, while
passing when run in isolation. Both poll gates compare strictly (clock isAfter
<at>, PartitionFlow.scala:275 and :279) against refs seeded with the flow's
acquisition instant, read from a millisecond-truncated clock. A poll takes a few
hundred microseconds, so the opening polls finish inside that same millisecond
and skip the gated work - no timers triggered, no commit offset computed - and
the assertions that follow see no scheduled commit, or a committed offset that
never advanced. Records still fold and later polls evaluate, so the fault is in
the tests.
Running those bodies under TestControl and stepping virtual time by 1 ms before
the first poll opens the gates deterministically, at no wall-clock cost. All
five measure 0/200 afterwards, with no assertion changed.
0 commit comments