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

[Core] Fix concurrent access issues in JUnit and TestNG formatters #1576

Merged
merged 2 commits into from
Mar 6, 2019

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Mar 6, 2019

Summary

Fix concurrent access issues in JUnit and TestNG formatters

Details

Both TestNGFormatter and JUnitFormatter use static fields internally to track the current state of the test. When parallel execution was introduced we accounted for this by storing all events until the end of the test run. This however doesn't work when there two tests running concurrently.

Removing the static fields resolves this.

Fixes: #1575

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 86.125% when pulling f1ad314 on fix-junit-concurrent-modification-exception into 9073e1e on master.

@mpkorstanje mpkorstanje merged commit 5da53ff into master Mar 6, 2019
@mpkorstanje mpkorstanje deleted the fix-junit-concurrent-modification-exception branch March 6, 2019 22:39
@lock
Copy link

lock bot commented Mar 10, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JUnitFormatter$TestCase throws ArrayIndexOutOfBoundsException in parallel execution
2 participants