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

changed HashSet to LinkedHashSet to fix flaky test #52

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

mumbler6
Copy link
Contributor

Linked PR / Issue: adobe/aem-core-wcm-components#2894

There is a flaky test in the aem-core-wcm-components project which should be fixed by changing the HashSet to a LinkedHashSet in the collectResourceTags function.

@stefanseifert
Copy link
Member

stefanseifert commented Nov 15, 2024

this method is only used by the mock implementation of TagManager#getTagsForSubtree which defines for the return value:

all tags for the given subtree (in no defined order)

so, although it's not expected to have an actual order, it's fine to at least always use the same order to get stable results in unit tests.

@stefanseifert stefanseifert merged commit 73a80e6 into wcm-io:develop Nov 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants