Fixed 6 flaky tests caused by unordered non-deterministic data-structures in lti/tsugi-util #13014
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed flaky test cases in the module:
./lti/tsugi-util/
Test-cases details
GroupService
is converted to Json, and its string representation is asserted against expected value. JSON conversion is non-deterministic, and the order of attributes can be different on different jvms, resulting in different string representationsMap
and AssertingMap-equality
, as it doesn't require matching key-orderingorg.tsugi.lti13.LTI13KeySetUtil
at Line:60,rsaKey
is being converted to a json-string, used further in a JsonObject. AsrsaKey
is a bean, its JSON conversion can result in non-deterministic string Same reason as1
Map
and AssertingMap-equality
, and a flexiblecontains
check for asserting goodness ofkeySetJSON
2
for both test-casescontains
check for asserting goodness ofkeySetJSON
1
for both test-cases1
for both test-casesFixed using NonDex
Suggested command to check all flaky tests :
For the particular test class:
For more information: https://github.com/TestingResearchIllinois/NonDex