aboutsummaryrefslogtreecommitdiff
path: root/src/time
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-05-08 10:59:34 -0400
committerGopher Robot <gobot@golang.org>2024-05-08 15:49:05 +0000
commit46aa30ff485aee401d591c719eb7bc49fde0391c (patch)
tree9825aba856d90c6d881f2882ae8b3a679446fb35 /src/time
parent4ed358b57efdad9ed710be7f4fc51495a7620ce2 (diff)
downloadgo-46aa30ff485aee401d591c719eb7bc49fde0391c.tar.xz
time: more deflaking asynctimer tests
For #66322. Change-Id: I1d83c7a3cacd2ab012039d954270a7c87bbdf5ce Reviewed-on: https://go-review.googlesource.com/c/go/+/584195 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/time')
-rw-r--r--src/time/tick_test.go5
1 files 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()