diff --git a/trace/trace_test.go b/trace/trace_test.go index ad18dbd13524..39d8907545d1 100644 --- a/trace/trace_test.go +++ b/trace/trace_test.go @@ -203,9 +203,7 @@ func TestSpanIDFromHex(t *testing.T) { if testcase.valid && err != nil { t.Errorf("Expected SpanID %s to be valid but end with error %s", testcase.hex, err.Error()) - } - - if !testcase.valid && err == nil { + } else if !testcase.valid && err == nil { t.Errorf("Expected SpanID %s to be invalid but end no error", testcase.hex) }