Fix data race in tail input tests (#7780)

This commit is contained in:
Jakub Warczarek 2020-07-03 00:20:47 +02:00 committed by GitHub
parent d259515774
commit decd656a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,6 @@ func TestTailBadLine(t *testing.T) {
acc := testutil.Accumulator{}
require.NoError(t, tt.Start(&acc))
defer tt.Stop()
buf := &bytes.Buffer{}
log.SetOutput(buf)
@ -129,6 +128,7 @@ func TestTailBadLine(t *testing.T) {
require.NoError(t, err)
time.Sleep(500 * time.Millisecond)
tt.Stop()
assert.Contains(t, buf.String(), "Malformed log line")
}