testify icon indicating copy to clipboard operation
testify copied to clipboard

Fix: a data race condition after a timeout on an `assert.Eventually` call.

Open kcross-ctoken opened this issue 4 months ago • 1 comments

Summary

Fixes a data race when using assert.Eventually so the variables can be safely used after a timeout

This was found in my test code when the eventually timed out and I was using something set in the closure. It required the --race go test parameter set.

Changes

added a wait group to wait for the end of the go routine call in assert.Eventually

kcross-ctoken avatar Aug 14 '25 11:08 kcross-ctoken

#1657 would resolve the issue here I believe.

brackendawson avatar Aug 17 '25 16:08 brackendawson