Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

Fix flaky test based on Nondex #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SpiceOwlf
Copy link

Hi, I used Nondex(https://github.com/TestingResearchIllinois/NonDex) on the project and found [checkTemplateNegociationDefault] does not have a uniform behavior. So I made some changes to the test to make it pass all possible situations. Please let me know if you want to discuss this change more. Thanks.

@SpiceOwlf
Copy link
Author

Updates:
The root cause of the failure is that (1) the templates are read from thedisk using listFiles() in


and (2) the files are put in a HashMap of variants in
Map<Variant, String> variants = new HashMap<>();

Neither listFiles() nor HashMap guarantee the order of the
elements, so the order of the variants in nondeterministic. When the
default variant is chosen as the first from the map it can end up being
one of the two variants, while the assertion expects it to be only one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant