Skip to content

Unexpected test runs count with retry analyzer - #2816

Merged
juherr merged 1 commit into
testng-team:masterfrom
krmahadevan:fix_2798
Nov 1, 2022
Merged

juherr merged 1 commit into
testng-team:masterfrom
krmahadevan:fix_2798

Conversation

@krmahadevan

Copy link
Copy Markdown
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.

@krmahadevan
krmahadevan requested a review from juherr as a code owner November 1, 2022 05:07

@juherr juherr left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
@juherr juherr added this to the 7.7.0 milestone Sep 7, 2026 — with ChatGPT Codex Connector
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