Skip to content

Commit

Permalink
changed HashSet to LinkedHashSet to fix flaky test (#52)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Seifert <[email protected]>
  • Loading branch information
mumbler6 and stefanseifert authored Nov 15, 2024
1 parent d973411 commit 73a80e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<action type="update" dev="sseifert">
Update to latest OSGi Mock.
</action>
<action type="fix" dev="Benjamin Guan" issue="52">
MockTagManager.getTagsForSubtree: Ensure stable order of result list.
</action>
</release>

<release version="5.6.2" date="2024-09-16">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
Expand Down Expand Up @@ -377,7 +378,7 @@ private Collection<Tag> collectResourceTags(Resource resource, boolean recurse)
if (resource == null) {
return Collections.emptyList();
}
Set<Tag> treeTags = new HashSet<>();
Set<Tag> treeTags = new LinkedHashSet<>();
Queue<Resource> searchResources = new LinkedList<>();
searchResources.add(resource);

Expand Down

0 comments on commit 73a80e6

Please sign in to comment.