Files
e3823a51ce Fix flaky TestScheduleOnceSequential (#36805)
The subtest used a fixed sleep before asserting callback counts, but
job.run waits until runAt plus up to scheduleOnceJitter. Under the race
detector or loaded CI that window can elapse after the sleep, so
newCount3 is still 0 and the assertion flakes.

Poll with require.Eventually (same approach as the paging subtest in
#35891) so the test waits for the scheduled callback without weakening
assertions.

Tests-only change. Verified with:
go test -run '^TestScheduleOnceSequential$/adding_two_callback_works' \
  -race -count=100 ./pluginapi/cluster/... (from server/public)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: mattermost-code <matty-code@mattermost.com>
2026-05-29 12:39:07 +02:00
..
2024-03-28 10:56:55 +00:00
2024-03-28 10:56:55 +00:00
2025-07-22 20:40:55 +05:30