Commit dfec3cf
authored
Fix intermittent test:
Fix another failing intermittent test [1] that has timing constraints
that are in practice just too tight for slower environments like GitHub
Actions CI where there might be a lot of parallelism going on and
goroutines may be paused for extended periods.
--- FAIL: Test_Client_Stop (0.00s)
--- FAIL: Test_Client_Stop/JobsInProgressCompletingPromptly (7.80s)
client_test.go:1293: Generated schema "river_test_2025_04_26t20_00_18_schema_14" with migrations [1 2 3 4 5 6] on line "main" in 1.427488883s [14 generated] [8 reused]
logger.go:256: time=2025-04-26T20:00:20.940Z level=INFO msg="River client started" client_id=fv-az1676-608_2025_04_26T20_00_20_859010
client_test.go:1306: timed out waiting for job to start
logger.go:256: time=2025-04-26T20:00:22.416Z level=INFO msg="callback job started with id=1"
logger.go:256: time=2025-04-26T20:00:25.941Z level=INFO msg="producer: Producer job counts" num_completed_jobs=0 num_jobs_running=1 queue=default
client_test.go:166:
Error Trace: /home/runner/work/river/river/client_test.go:166
/opt/hostedtoolcache/go/1.24.2/x64/src/testing/testing.go:1211
/opt/hostedtoolcache/go/1.24.2/x64/src/testing/testing.go:1445
/opt/hostedtoolcache/go/1.24.2/x64/src/testing/testing.go:1786
/opt/hostedtoolcache/go/1.24.2/x64/src/runtime/panic.go:636
/opt/hostedtoolcache/go/1.24.2/x64/src/testing/testing.go:1041
/opt/hostedtoolcache/go/1.24.2/x64/src/testing/testing.go:1118
/home/runner/work/river/river/client_test.go:1306
Error: Received unexpected error:
context deadline exceeded
Test: Test_Client_Stop/JobsInProgressCompletingPromptly
riverdbtest.go:277: Checked in schema "river_test_2025_04_26t20_00_18_schema_14"; 1 idle schema(s) [16 generated] [9 reused]
FAIL
FAIL github.com/riverqueue/river 34.083s
Switch to `riversharedtest.WaitOrTimeout` which tolerates up to 10
seconds in GitHub Actions instead of only 1. Get rid of context timeout
that won't accomplish anything except make tests fail intermittently
(and in general we should use the Go test `-timeout` flag instead
because it prints good stack trace information).
[1] https://github.com/riverqueue/river/actions/runs/14684606192/job/41211616466Test_Client_Stop/JobsInProgressCompletingPromptly (#864)1 parent d908666 commit dfec3cf
1 file changed
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1391 | 1391 | | |
1392 | 1392 | | |
1393 | 1393 | | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
1397 | 1394 | | |
1398 | 1395 | | |
1399 | 1396 | | |
1400 | 1397 | | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
| 1398 | + | |
1407 | 1399 | | |
1408 | 1400 | | |
1409 | 1401 | | |
| |||
0 commit comments