From f46370d982caef975fb629898c453b12e15af17a Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Tue, 5 Sep 2017 12:50:01 -0700 Subject: [PATCH] Sort metrics before comparing in graphite test (cherry picked from commit 98e784faf3b7933d48fe27f25a185ed9e7afaaba) --- plugins/serializers/graphite/graphite_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/serializers/graphite/graphite_test.go b/plugins/serializers/graphite/graphite_test.go index 62d0f2a24..a6dd1aaa9 100644 --- a/plugins/serializers/graphite/graphite_test.go +++ b/plugins/serializers/graphite/graphite_test.go @@ -212,6 +212,8 @@ func TestSerializeValueBoolean(t *testing.T) { fmt.Sprintf("localhost.enabled.cpu0.us-west-2.cpu 1 %d", now.Unix()), fmt.Sprintf("localhost.disabled.cpu0.us-west-2.cpu 0 %d", now.Unix()), } + sort.Strings(mS) + sort.Strings(expS) assert.Equal(t, expS, mS) }