diff --git a/tail_test.go b/tail_test.go index 61edab4..e9397c0 100644 --- a/tail_test.go +++ b/tail_test.go @@ -507,10 +507,9 @@ func (t TailTest) VerifyTailOutput(tail *Tail, lines []string) { } func (t TailTest) Cleanup(tail *Tail, stop bool) { - <-time.After(100 * time.Millisecond) + <-t.done if stop { tail.Stop() } tail.Cleanup() - <-t.done }