Skip to content

Commit 46aa30f

Browse files
rscgopherbot
authored andcommitted
time: more deflaking asynctimer tests
For #66322. Change-Id: I1d83c7a3cacd2ab012039d954270a7c87bbdf5ce Reviewed-on: https://go-review.googlesource.com/c/go/+/584195 Reviewed-by: Cherry Mui <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Russ Cox <[email protected]>
1 parent 4ed358b commit 46aa30f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/time/tick_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ func testTimerChan(t *testing.T, tim timer, C <-chan Time, synctimerchan bool) {
440440
Sleep(sched)
441441
tim.Reset(10000 * Second)
442442
if isTicker {
443-
assertTick()
443+
drain()
444444
}
445445
noTick()
446446

@@ -466,8 +466,7 @@ func testTimerChan(t *testing.T, tim timer, C <-chan Time, synctimerchan bool) {
466466
Sleep(sched)
467467
tim.Reset(10000 * Second)
468468
if !synctimerchan && isTicker {
469-
assertLen()
470-
assertTick()
469+
drain()
471470
}
472471
noTick()
473472

0 commit comments

Comments
 (0)