From 711993e24b1ad07ab48d2e097792592370a2932c Mon Sep 17 00:00:00 2001 From: tdakkota Date: Sat, 13 Nov 2021 15:01:40 +0300 Subject: [PATCH] test(tgerr): fix flaky test --- tgerr/flood_wait_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tgerr/flood_wait_test.go b/tgerr/flood_wait_test.go index 5803516291..1511106d7b 100644 --- a/tgerr/flood_wait_test.go +++ b/tgerr/flood_wait_test.go @@ -29,6 +29,7 @@ func TestFloodWait(t *testing.T) { e := floodWaitErr done := make(chan struct{}) + observer := c.Observe() go func() { ok, err := FloodWait(ctx, e, FloodWaitWithClock(c)) a.True(ok) @@ -37,7 +38,7 @@ func TestFloodWait(t *testing.T) { close(done) }() - <-c.Observe() + <-observer c.Travel(3601 * time.Second) <-done })