Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing failure for the test test.retryAnalyzer.RetryAnalyzerTest.ensureRetryDoesntRunEndlesslyForDataDrivenTests Github actions failure on `master` branch: https://github.com/testng-team/testng/actions/runs/8307524777/job/22736819681 Gradle scan results link: https://scans.gradle.com/s/wap5a5bvq3qgq/tests/task/:testng-core:test/details/test.retryAnalyzer.RetryAnalyzerTest/ensureRetryDoesntRunEndlesslyForDataDrivenTests?top-execution=1 Prerequisites for failure: The below JVM arguments should be used: * `-Duser.timezone="America/New_York”` * `-Duser.country=RU` * `-Duser.language=ru` * `-XX:+UnlockExperimentalVMOptions` * `-XX:hashCode=2` Root cause: We are using hashCode() to create Key that is used to determine if a RetryAnalyzer instance should be created or not. When we run the tests using `-XX:hashCode=2` it causes the JVM to generate the same hashcode (value 1) And this messes up the `RetryAnalyzer` object creation. Fix: Addressed this by wrapping the parameters into an object which will contain a unique id that can be used to represent the same set of parameters.
- Loading branch information