Fix intermittent TestTailBadLine failures (#3869)
This commit is contained in:
parent
f7207f514e
commit
8005883de8
|
@ -103,10 +103,10 @@ func TestTailBadLine(t *testing.T) {
|
||||||
|
|
||||||
acc := testutil.Accumulator{}
|
acc := testutil.Accumulator{}
|
||||||
require.NoError(t, tt.Start(&acc))
|
require.NoError(t, tt.Start(&acc))
|
||||||
|
require.NoError(t, acc.GatherError(tt.Gather))
|
||||||
|
|
||||||
_, err = tmpfile.WriteString("cpu mytag= foo usage_idle= 100\n")
|
_, err = tmpfile.WriteString("cpu mytag= foo usage_idle= 100\n")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.NoError(t, acc.GatherError(tt.Gather))
|
|
||||||
|
|
||||||
acc.WaitError(1)
|
acc.WaitError(1)
|
||||||
assert.Contains(t, acc.Errors[0].Error(), "E! Malformed log line")
|
assert.Contains(t, acc.Errors[0].Error(), "E! Malformed log line")
|
||||||
|
|
Loading…
Reference in New Issue