Wait for done chan first before Cleanup

This commit is contained in:
Nino Khodabandeh 2016-04-26 12:23:22 -07:00
parent 308ca46680
commit 26dc82c746
1 changed files with 1 additions and 2 deletions

View File

@ -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
}