Skip to content

Conversation

@SungJin1212
Copy link
Member

This PR changes the TestFragmenter to use require.ElementsMatch to compare slices without order.

Reason

In PlanFragmenter, since child fragment IDs are collected using a map (childFragmentIDs), the ChildIDs slice is non-deterministic.

childFragmentIDs := make(map[uint64]bool)
children := (*current).Children()

...

childIDs := make([]uint64, 0, len(childFragmentIDs))
for fragmentID := range childFragmentIDs {
	childIDs = append(childIDs, fragmentID)
}

...

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: SungJin1212 <[email protected]>
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

@yeya24 yeya24 merged commit 250643e into cortexproject:master Dec 8, 2025
46 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants