From eac36d123e194d222fe93cc6c056e80f7a86368f Mon Sep 17 00:00:00 2001 From: Tobias Schmidt Date: Mon, 3 Apr 2017 13:02:15 +0200 Subject: [PATCH] Fix unstable fanin test (#2558) --- storage/fanin/fanin_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storage/fanin/fanin_test.go b/storage/fanin/fanin_test.go index 028c7300f..2a13619f6 100644 --- a/storage/fanin/fanin_test.go +++ b/storage/fanin/fanin_test.go @@ -698,6 +698,9 @@ func TestMetricsForLabelMatchersIgnoresRemoteData(t *testing.T) { if err != nil { t.Fatal(err) } + sort.Slice(got, func(i, j int) bool { + return got[i].Metric.Before(got[j].Metric) + }) want := []metric.Metric{ {