tt0suzy opened a new pull request, #6967: URL: https://github.com/apache/cloudstack/pull/6967
### Description <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. --> <!-- For new features, provide link to FS, dev ML discussion etc. --> <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. --> <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged --> <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" --> <!-- Fixes: # --> <!--- ********************************************************************************* --> <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. --> <!--- PLEASE PUT AN 'X' in only **ONE** box --> <!--- ********************************************************************************* --> Similar as [6875](https://github.com/apache/cloudstack/pull/6875). The test `org.apache.cloudstack.api.command.test.ResetVMUserDataCmdTest.testUserdataDetails`, is a [flaky tests](https://docs.gitlab.com/ee/development/testing_guide/flaky_tests.html). It can pass mvn test but when run using the tool [NonDex](https://github.com/TestingResearchIllinois/NonDex), it fails. NonDex is a tool that will introduce non-determinism in certain java collections. The cause of failure is because the test is comparing the string format of two hashmap, however, as per [Oracle's documentation](https://docs.oracle.com/javase/7/docs/api/java/util/HashMap.html) > The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. This class makes no guarantees as to the order of the map; in particular, it does not guarantee that the order will remain constant over time. So the result of `toString()` is non-deterministic. Use hashmap's own equal methods is more reasonable. ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [ ] Major - [ ] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [x] Minor - [ ] Trivial ### Screenshots (if appropriate): <img width="1079" alt="image" src="https://user-images.githubusercontent.com/28588062/206830625-a1dbd09c-fdeb-4b3b-8652-f4cccdcf975d.png"> ### How Has This Been Tested? <!-- Please describe in detail how you tested your changes. --> <!-- Include details of your testing environment, and the tests you ran to --> <!-- see how your change affects other areas of the code, etc. --> Steps to reproduce the failure: Run the following command in pinot: 1. First, build the module: ` mvn -pl api -am -DskipTests` 2. Then run the test using NonDex `mvn -pl api edu.illinois:nondex-maven-plugin:2.1:nondex -Dtest=org.apache.cloudstack.api.command.test.ResetVMUserDataCmdTest#testUserdataDetails` The result will be saved under the module folder in .nondex <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
