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

Test case failure #3093

Commits on Mar 16, 2024

  1. Test case failure

    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.
    krmahadevan committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    3505e4b View commit details
    Browse the repository at this point in the history