Skip to content

Commit

Permalink
Update new unit test for hidden warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zenador committed Nov 30, 2023
1 parent 4eb478a commit bdd8bfa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/frontend/querymiddleware/querysharding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -837,9 +837,8 @@ func TestQuerySharding_NonMonotonicHistogramBuckets(t *testing.T) {
sort.Sort(byLabels(shardedPrometheusRes.Data.Result))
approximatelyEquals(t, expectedPrometheusRes, shardedPrometheusRes)

// Ensure the bucket monotonicity has been fixed by PromQL engine.
require.Len(t, shardedPrometheusRes.GetWarnings(), 1)
assert.Contains(t, shardedPrometheusRes.Warnings, annotations.HistogramQuantileForcedMonotonicityInfo.Error())
// Ensure the warning about bucket monotonicity from PromQL engine is hidden.
require.Len(t, shardedPrometheusRes.GetWarnings(), 0)
})
}
})
Expand Down

0 comments on commit bdd8bfa

Please sign in to comment.