Skip to content
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

Fix panics setting TestResult asynchronously #36

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

prashantv
Copy link
Owner

Panic handling is deferred before the defer that marks tests complete. This could lead to a test being marked complete, returning a result but then mutating that result after returning.

This happened infrequently but could lead to a flaky result where a panicked test isn't marked as Failed(). Added test runs many iterations so we are more likely to trigger a failure on flakes.

Panic handling is deferred before the defer that marks tests complete.
This could lead to a test being marked complete, returning a result
but then mutating that result after returning.

This happened infrequently but could lead to a flaky result where a
panicked test isn't marked as `Failed()`.

Added test runs many iterations so we are more likely to trigger a
failure on flakes. Add `syncutil` to run iteraitons in parallel
without adding significant noise to the test.
@prashantv prashantv force-pushed the prashant/faket-panic-race branch from fca59a1 to c875974 Compare January 23, 2025 00:05
@prashantv prashantv merged commit 62c3f50 into main Jan 23, 2025
3 checks passed
@prashantv prashantv deleted the prashant/faket-panic-race branch January 23, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant