Skip to content

Commit

Permalink
Add test to check that group isn't mutated
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduchesne committed Jan 10, 2025
1 parent 13b96f4 commit b33ec96
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/ruler/rule_concurrency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ func TestSplitGroupIntoBatches(t *testing.T) {

batches := controller.SplitGroupIntoBatches(context.Background(), group)
requireConcurrentRulesEqual(t, tc.expectedGroups, batches)

// Make sure the group is not mutated and will still return the same batches when called again.
batches = controller.SplitGroupIntoBatches(context.Background(), group)
requireConcurrentRulesEqual(t, tc.expectedGroups, batches)
})
}
}
Expand Down

0 comments on commit b33ec96

Please sign in to comment.