-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TestHashRing+TestServiceWithMockDal fail go test -race
#1368
Comments
go test -race
go test -race
Reopening, hit this case:
|
Error report is here https://github.com/TBD54566975/ftl/actions/runs/8903975228/job/24452548713?pr=1360 From what I can tell The main test function is blocked trying to advance the mock clock but is getting stuck when sending a message to its channel:
While a bunch of other goroutines are blocked trying to access clock.Now() but can't get a lock (internal to benbjohnson/clock) From
We adhere to this fine, this is the only place we are advancing the clock in this test: cronjobs_utils_test.go#L248 I think what is happening is:
Steps:
I haven't got a solid footing in goroutines/channels yet, so I may have missed something Also FYI, the clock library has been archived for about a year now:
|
To unblock main branch from failing CI with this issue: #1368
Closing for now. Test is skipped, and integration test tests the same thing with the real db |
Just saw this on my PR. I restarted the job which worked. https://github.com/TBD54566975/ftl/actions/runs/9090895040/attempts/1 |
fixes #2092 - mock clock was causing the same race conditions as this issue: #1368 (comment) - instead we are now wrapping the ASM provider with a manual sync provider - This wrapper allows us to trigger when syncs should happen in tests, and block until sync completes
TestHashRing and TestServiceWithMockDal fail the race detector. It's disabled for now, but needs to be fixed and reenabled.
The text was updated successfully, but these errors were encountered: