From 4a307aec34e715d5b8a3e7ac30e4c8aff9954d88 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 27 Oct 2016 11:48:00 -0700 Subject: [PATCH] Fix flaky test --- nomad/structs/funcs_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nomad/structs/funcs_test.go b/nomad/structs/funcs_test.go index 059314a72..477842c5f 100644 --- a/nomad/structs/funcs_test.go +++ b/nomad/structs/funcs_test.go @@ -4,6 +4,7 @@ import ( "fmt" "reflect" "regexp" + "sort" "testing" ) @@ -295,7 +296,8 @@ func TestMapStringStringSliceValueSet(t *testing.T) { act := MapStringStringSliceValueSet(m) exp := []string{"1", "2", "3"} + sort.Strings(act) if !reflect.DeepEqual(act, exp) { - t.Fatalf("Bad") + t.Fatalf("Bad; got %v; want %v", act, exp) } }