-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
assert.EventuallyWithT: CollectT is not protected against concurrent use #1418
Labels
Comments
dolmen
added
bug
pkg-assert
Change related to package testify/assert
concurrency
labels
Jul 11, 2023
Cc: @brackendawson |
dolmen
changed the title
assert.EventuallyWithT: race condition because
assert.EventuallyWithT: CollectT is not protected against concurrent use
Jul 11, 2023
I wonder if we should allow to run the condition function in parallel (and skip ticks) or if instead we should fix error collection to have separate instance for each call. I have no idea how |
There is already a pending MR that aims to fix this: #1395 |
Duplicate of #1391. |
#1396 is also related, but not a duplicate. |
#1395 is a way to fix this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
assert.EventuallyWithT
, if the tick is small, the calls to the condition may overlap (run simultaneously). However they share an access to anassert.CollectT
instance which is not protected for concurrent use. Race condition may occur.The text was updated successfully, but these errors were encountered: