mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
bandaid for non-deterministic clist test (#3575)
* add a deterministic timeout Co-Authored-By: kevlubkcm <36485490+kevlubkcm@users.noreply.github.com>
This commit is contained in:
parent
90465f727f
commit
f2aa1bf50e
@ -261,6 +261,8 @@ func TestWaitChan(t *testing.T) {
|
|||||||
pushed++
|
pushed++
|
||||||
time.Sleep(time.Duration(cmn.RandIntn(25)) * time.Millisecond)
|
time.Sleep(time.Duration(cmn.RandIntn(25)) * time.Millisecond)
|
||||||
}
|
}
|
||||||
|
// apply a deterministic pause so the counter has time to catch up
|
||||||
|
time.Sleep(25 * time.Millisecond)
|
||||||
close(done)
|
close(done)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -273,7 +275,7 @@ FOR_LOOP:
|
|||||||
next = next.Next()
|
next = next.Next()
|
||||||
seen++
|
seen++
|
||||||
if next == nil {
|
if next == nil {
|
||||||
continue
|
t.Fatal("Next should not be nil when waiting on NextWaitChan")
|
||||||
}
|
}
|
||||||
case <-done:
|
case <-done:
|
||||||
break FOR_LOOP
|
break FOR_LOOP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user