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
{{ message }}
Repository navigation
tests: four independent waitFor helpers, no shared poll-until helper #1023
Found by the sweep for #1018, which also found that the tests that did NOT have one were the ones racing process startup on CI. A fifth copy is the likely outcome of the next such fix.
Worth one shared helper in a small internal/testutil package: WaitFor(t, what string, cond func() bool) with a generous default deadline, a short interval, and a failure message that names what it was waiting for. The four sites migrate to it. Keep it simple; the value is one place to adjust when a deadline turns out too tight on a loaded runner, rather than four.
Good first issue: mechanical, well bounded, and the existing helpers show exactly what the shared one needs to do.
Heads up: the four call sites in the issue weren't the only ones. Since these were unexported package-level helpers, other test files in the same package (scheduler_test.go, tools_test.go, session_test.go) also called them. This PR migrates all real call sites to internal/testutil.WaitFor, not just the four listed. Builds clean, existing tests pass. Opening the PR now.
I see this repo requires the issue-approved label before a PR is opened (per CONTRIBUTING.md), which this issue doesn't have yet. Holding off on the PR until that's added, happy to open it as soon as it is. @Vasanthdev2004
Activity
Fayupable commentedon Sep 8, 2026
Heads up: the four call sites in the issue weren't the only ones. Since these were unexported package-level helpers, other test files in the same package (scheduler_test.go, tools_test.go, session_test.go) also called them. This PR migrates all real call sites to internal/testutil.WaitFor, not just the four listed. Builds clean, existing tests pass. Opening the PR now.
Fayupable commentedon Sep 8, 2026
I see this repo requires the issue-approved label before a PR is opened (per CONTRIBUTING.md), which this issue doesn't have yet. Holding off on the PR until that's added, happy to open it as soon as it is. @Vasanthdev2004
refactor(tests): replace duplicated wait-for helpers with testutil.Wa…
refactor(tests): replace duplicated wait-for helpers with testutil.Wa…