Skip to content

Commit 41d9c8b

Browse files
authored
fix: Make policy test non-flaky (#16158)
1 parent 7e7782e commit 41d9c8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎pkg/validation/ingestion_policies_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func Test_PolicyStreamMapping_PolicyFor(t *testing.T) {
3131
"policy3": []*PriorityStream{
3232
{
3333
Selector: `{qyx="qzx", qox="qox"}`,
34-
Priority: 1,
34+
Priority: 2,
3535
Matchers: []*labels.Matcher{
3636
labels.MustNewMatcher(labels.MatchEqual, "qyx", "qzx"),
3737
labels.MustNewMatcher(labels.MatchEqual, "qox", "qox"),
@@ -51,7 +51,7 @@ func Test_PolicyStreamMapping_PolicyFor(t *testing.T) {
5151
"policy5": []*PriorityStream{
5252
{
5353
Selector: `{qab=~"qzx.*"}`,
54-
Priority: 1,
54+
Priority: 2,
5555
Matchers: []*labels.Matcher{
5656
labels.MustNewMatcher(labels.MatchRegexp, "qab", "qzx.*"),
5757
},
@@ -94,7 +94,7 @@ func Test_PolicyStreamMapping_PolicyFor(t *testing.T) {
9494
require.Equal(t, "policy1", mapping.PolicyFor(labels.FromStrings("foo", "bar")))
9595
// matches both policy2 and policy1 but policy1 has higher priority.
9696
require.Equal(t, "policy1", mapping.PolicyFor(labels.FromStrings("foo", "bar", "daz", "baz")))
97-
// matches policy3 and policy4 but policy3 appears first.
97+
// matches policy3 and policy4 but policy3 has higher priority..
9898
require.Equal(t, "policy3", mapping.PolicyFor(labels.FromStrings("qyx", "qzx", "qox", "qox")))
9999
// matches no policy.
100100
require.Equal(t, "", mapping.PolicyFor(labels.FromStrings("foo", "fooz", "daz", "qux", "quux", "corge")))

0 commit comments

Comments
 (0)