From b5dfa2414b9e65a275caad29c4023290d841c9ba Mon Sep 17 00:00:00 2001 From: Ganesh Vernekar <15064823+codesome@users.noreply.github.com> Date: Sun, 24 Jan 2021 20:23:30 +0530 Subject: [PATCH] Fix flaky TestAtModifier (#8401) Signed-off-by: Ganesh Vernekar --- promql/engine_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/promql/engine_test.go b/promql/engine_test.go index 273ae272c..52ae66bc1 100644 --- a/promql/engine_test.go +++ b/promql/engine_test.go @@ -1053,6 +1053,10 @@ load 1ms res := qry.Exec(test.Context()) require.NoError(t, res.Err) + if expMat, ok := c.result.(Matrix); ok { + sort.Sort(expMat) + sort.Sort(res.Value.(Matrix)) + } require.Equal(t, c.result, res.Value, "query %q failed", c.query) }) }