cloudstack/api
tt0suzy 8aaa5edaa1
api: fixed flaky test (#6967)
Similar as 6875.

The test org.apache.cloudstack.api.command.test.ResetVMUserDataCmdTest.testUserdataDetails, is a flaky tests. It can pass mvn test but when run using the tool 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 hashmaps, however, as per Oracle's documentation:

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.
2022-12-12 12:44:14 +05:30
..
src api: fixed flaky test (#6967) 2022-12-12 12:44:14 +05:30
test/integration/api Enable flake8 rule W292 No newline at end of file (#6274) 2022-06-30 12:08:27 +05:30
pom.xml Updating pom.xml version numbers for release 4.17.2.0-SNAPSHOT 2022-09-19 16:21:35 +05:30