-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
(bug) flaky test - Test_websocket_flag_change #1790
Comments
Hey @bearrito thanks for sharing this. |
It looks like what is happening is a concurrent write to the webscocket connection https://github.com/thomaspoignant/go-feature-flag/blob/main/cmd/relayproxy/service/websocket.go#L45
I can force this by doing one of two things Number 1
Set the ping pong frequency to something high https://github.com/thomaspoignant/go-feature-flag/blob/main/cmd/relayproxy/controller/ws_flag_change.go#L77 I did 100ms Eventually the Broadcast and ping-pong will race. I takes a lot of loops and fast ping-pong rate so if this is real I bet this is rare in production. Number 2 |
Hey @bearrito, |
Observed behaviour
I started looking at this because my pr code coverage failed. The failure was unrelated.
https://github.com/thomaspoignant/go-feature-flag/actions/runs/8790234882/job/24121807507?pr=1770
I believe there is a data race in
wsFlagChange
I can repo this locally but it's very difficult to trigger.Expected Behavior
Tests to pass.
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: