mirror of
https://github.com/floci-io/floci.git
synced 2026-12-02 09:47:56 -05:00
batchingWindowHoldsUnderfilledBatchUntilTheWindowElapses slept 25ms between polls and then moved the fake clock forward. The poll runs on a separate thread and starts the window when it reads the clock, so a poll that took longer than 25ms on a busy runner started the window late (for example at 3s). The later polls were skipped while it was still running, and at 5s the window had not elapsed, so the function was never invoked. pollAndInvoke now returns the future of the submitted poll, and the test waits for each poll to finish before moving the clock.