Skip to content

Commit

Permalink
Fix data race in tail input tests (influxdata#7780)
Browse files Browse the repository at this point in the history
  • Loading branch information
programmer04 authored Jul 2, 2020
1 parent d259515 commit decd656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inputs/tail/tail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
}

Expand Down

0 comments on commit decd656

Please sign in to comment.