From 46aa30ff485aee401d591c719eb7bc49fde0391c Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 8 May 2024 10:59:34 -0400 Subject: [PATCH] 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 --- src/time/tick_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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() -- 2.48.1