mirror of https://github.com/stretchr/testify.git
assert: remove logs in TestEventuallyTimeout
parent
e8837d5396
commit
5dca985ff4
|
@ -2876,25 +2876,20 @@ func TestEventuallyTimeout(t *testing.T) {
|
||||||
mockT := new(testing.T)
|
mockT := new(testing.T)
|
||||||
|
|
||||||
NotPanics(t, func() {
|
NotPanics(t, func() {
|
||||||
t.Log("start")
|
|
||||||
done, done2 := make(chan struct{}), make(chan struct{})
|
done, done2 := make(chan struct{}), make(chan struct{})
|
||||||
|
|
||||||
// A condition function that returns after the Eventually timeout
|
// A condition function that returns after the Eventually timeout
|
||||||
condition := func() bool {
|
condition := func() bool {
|
||||||
t.Log("ok1")
|
|
||||||
// Wait until Eventually times out and terminates
|
// Wait until Eventually times out and terminates
|
||||||
<-done
|
<-done
|
||||||
close(done2)
|
close(done2)
|
||||||
t.Log("ok2")
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
False(t, Eventually(mockT, condition, time.Millisecond, time.Microsecond))
|
False(t, Eventually(mockT, condition, time.Millisecond, time.Microsecond))
|
||||||
|
|
||||||
t.Log("Eventually done")
|
|
||||||
close(done)
|
close(done)
|
||||||
<-done2
|
<-done2
|
||||||
t.Log("Test done")
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue