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
createReceiver() calls receiver.start(), which schedules a real background poll every 5 s. Sometimes that poll sneaks in between the test's two manual poll() calls and adds an extra batch, so the exact count no longer matches. Same root cause as #414, I think.
I reproduced it locally: wait 5.5 s between the two polls and testPoll2 fails every time (32 instead of 16).
Hey @mgaffigan, I came across this while researching CI test stability. Dealing with tests that fail on the initial run and pass on retry masks whether the problem is in the test body, timing, or the CI runner environment. I'm building an open-source tool called Flaky-Repro that focuses on reproducing intermittent test failures by systematically varying execution conditions. If you're still working through this, happy to share how we approach reproducing these or see if varying execution conditions helps recreate it.
Activity
e210 commentedon Oct 4, 2026
Found the culprit, and it's a sneaky one 🕵️
createReceiver()callsreceiver.start(), which schedules a real background poll every 5 s. Sometimes that poll sneaks in between the test's two manualpoll()calls and adds an extra batch, so the exact count no longer matches. Same root cause as #414, I think.I reproduced it locally: wait 5.5 s between the two polls and
testPoll2fails every time (32 instead of 16).The fix is one line in
createReceiver():In other words, we politely ask the scheduler to stop photobombing the test 📸
Happy to open a PR if that works for you!
mgaffigan commentedon Oct 5, 2026
@e210, thanks for the investigation! Please send a PR if you can. I agree it seems similar to 414.
MrigankKumawat commentedon Oct 6, 2026
Hey @mgaffigan, I came across this while researching CI test stability. Dealing with tests that fail on the initial run and pass on retry masks whether the problem is in the test body, timing, or the CI runner environment. I'm building an open-source tool called Flaky-Repro that focuses on reproducing intermittent test failures by systematically varying execution conditions. If you're still working through this, happy to share how we approach reproducing these or see if varying execution conditions helps recreate it.
mgaffigan commentedon Oct 6, 2026
@MrigankKumawat,
Thanks for reaching out. This one reproduces easily by running in a loop, but I'll keep an eye out for the tool.
Stop background polls from racing FileReceiverTest (#467)