add failing test case
This commit is contained in:
parent
734bf58f78
commit
afbbb638b5
10
tail_test.go
10
tail_test.go
|
@ -265,16 +265,22 @@ func TestRateLimiting(_t *testing.T) {
|
|||
LimitRate: 2}
|
||||
expecting := "Too much log activity (more than 2 lines per second being written); waiting a second before resuming tailing"
|
||||
tail := t.StartTail("test.txt", config)
|
||||
|
||||
// TODO: also verify that tail resumes after the cooloff period.
|
||||
go t.VerifyTailOutput(
|
||||
tail,
|
||||
[]string{"hello", "world", "again", expecting})
|
||||
[]string{"hello", "world", "again", expecting, "more", "data"})
|
||||
|
||||
// Add more data only after reasonable delay.
|
||||
<-time.After(1200 * time.Millisecond)
|
||||
t.AppendFile("test.txt", "more\ndata\n")
|
||||
|
||||
// Delete after a reasonable delay, to give tail sufficient time
|
||||
// to read all lines.
|
||||
<-time.After(100 * time.Millisecond)
|
||||
t.RemoveFile("test.txt")
|
||||
tail.Stop()
|
||||
|
||||
// tail.Stop()
|
||||
Cleanup()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue