fix flaky server test on Travis

This commit is contained in:
Marten Seemann 2020-07-06 11:21:08 +07:00
parent 05f9428b34
commit 084e4feb9b

View file

@ -645,7 +645,10 @@ var _ = Describe("Server", func() {
wg.Wait()
close(acceptSession)
Eventually(func() uint32 { return atomic.LoadUint32(&counter) }).Should(BeEquivalentTo(protocol.MaxServerUnprocessedPackets + 1))
Eventually(
func() uint32 { return atomic.LoadUint32(&counter) },
scaleDuration(100*time.Millisecond),
).Should(BeEquivalentTo(protocol.MaxServerUnprocessedPackets + 1))
Consistently(func() uint32 { return atomic.LoadUint32(&counter) }).Should(BeEquivalentTo(protocol.MaxServerUnprocessedPackets + 1))
})