-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
DATA RACE when using ghttp.AllowUnhandledRequests #173
Comments
Hmm. I'm not sure but the only fix to this might be to add new setters and getters and a new lock in order to lock around We can leave the two properties exported so as not to break backward compatibility but then update the documentation to recommend people use the setters and getters. Would you be up for submitting a PR for this @jhvhs ? |
:bump: any thoughts on a PR? |
This reproduces the racing behaviour here, though doesn't quite match the setup. However I can totally imagine someone writing a test that flows:
So if we do an enhancement here and add mutexed getters/setters, maybe we can work off the code ^ to test drive it out. |
when accessing ghttp.AllowUnhandledRequests and ghttp.UnhandledRequestsStatusCode Solves #173 Signed-off-by: Derik Evangelista <devangelista@pivotal.io>
This issue has been fixed, closing 🎉 |
When running tests with
ginkgo -r -race -skipMeasurements -randomizeAllSpecs
and the
ghttp.Server
is configured as:The tests running against the server pass, but the output is cluttered with the DATA RACE stack trace:
The text was updated successfully, but these errors were encountered: