Fix unit tests

This commit is contained in:
Kegan Dougal 2020-08-19 16:23:57 +01:00
parent a3c11b21c7
commit 9d3c1a5a33

View file

@ -36,7 +36,10 @@ func TestBackoff(t *testing.T) {
// completes but we will find out how long the backoff should // completes but we will find out how long the backoff should
// have been. // have been.
interrupt := make(chan bool, 1) interrupt := make(chan bool, 1)
close(interrupt) go func() {
time.Sleep(10 * time.Millisecond)
close(interrupt)
}()
// Get the duration. // Get the duration.
duration, blacklist := server.BackoffIfRequired(backingOff, interrupt) duration, blacklist := server.BackoffIfRequired(backingOff, interrupt)