From: Russ Cox Date: Wed, 8 May 2024 14:59:34 +0000 (-0400) Subject: time: more deflaking asynctimer tests X-Git-Tag: go1.23rc1~434 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=46aa30ff485aee401d591c719eb7bc49fde0391c;p=gostls13.git time: more deflaking asynctimer tests For #66322. Change-Id: I1d83c7a3cacd2ab012039d954270a7c87bbdf5ce Reviewed-on: https://go-review.googlesource.com/c/go/+/584195 Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Auto-Submit: Russ Cox --- diff --git a/src/time/tick_test.go b/src/time/tick_test.go index 42ef6d3217..4aaf6a2b80 100644 --- a/src/time/tick_test.go +++ b/src/time/tick_test.go @@ -440,7 +440,7 @@ func testTimerChan(t *testing.T, tim timer, C <-chan Time, synctimerchan bool) { Sleep(sched) tim.Reset(10000 * Second) if isTicker { - assertTick() + drain() } noTick() @@ -466,8 +466,7 @@ func testTimerChan(t *testing.T, tim timer, C <-chan Time, synctimerchan bool) { Sleep(sched) tim.Reset(10000 * Second) if !synctimerchan && isTicker { - assertLen() - assertTick() + drain() } noTick()