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

Unexpected test runs count with retry analyzer #2816

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

krmahadevan
Copy link
Member

Closes #2798

Fixes #2798 .

Did you remember to?

  • Add test case(s)
  • Update CHANGES.txt
  • Auto applied styling via ./gradlew autostyleApply

We encourage pull requests that:

  • Add new features to TestNG (or)
  • Fix bugs in TestNG

If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.

Note: For more information on contribution guidelines please make sure you refer our Contributing section for detailed set of steps.

Copy link
Member

@juherr juherr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't catch what is the fix because it looks just like a refactor (which is good btw).
Did you reproduce the issue?

@krmahadevan
Copy link
Member Author

I don't catch what is the fix because it looks just like a refactor (which is good btw). Did you reproduce the issue?

Yes I have reproduced the problem and only after this change the problem goes away.
The issue is that the object instantiation is NOT atomic in nature. So we should have been using either a synchronized() keyword (or) we should have used a Function so that the Map implementation guarantees the atomicity.

@krmahadevan
Copy link
Member Author

Earlier the get() and put() are not atomic in nature.

@juherr juherr merged commit 8ecef60 into testng-team:master Nov 1, 2022
@krmahadevan krmahadevan deleted the fix_2798 branch November 1, 2022 09:40
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.

Unexpected test runs count with retry analyzer
2 participants