diff --git a/testutil/accumulator.go b/testutil/accumulator.go index 65c8883e0..3fe291699 100644 --- a/testutil/accumulator.go +++ b/testutil/accumulator.go @@ -340,9 +340,10 @@ func (a *Accumulator) AssertDoesNotContainsTaggedFields( continue } - if p.Measurement == measurement { - assert.Equal(t, fields, p.Fields) - msg := fmt.Sprintf("found measurement %s with tags %v which should not be there", measurement, tags) + if p.Measurement == measurement && reflect.DeepEqual(fields, p.Fields) { + msg := fmt.Sprintf( + "found measurement %s with tagged fields (tags %v) which should not be there", + measurement, tags) assert.Fail(t, msg) } }