Skip to content

Commit aa6699c

Browse files
committed
add runtime.Gosched() to check timer resetting
1 parent 8fb8bb6 commit aa6699c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/table/client_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,9 @@ func TestSessionPoolDoublePut(t *testing.T) {
763763

764764
func mustResetTimer(t testing.TB, ch <-chan time.Duration, exp time.Duration) {
765765
t.Helper()
766+
767+
runtime.Gosched()
768+
766769
select {
767770
case act := <-ch:
768771
if act != exp {
@@ -771,7 +774,7 @@ func mustResetTimer(t testing.TB, ch <-chan time.Duration, exp time.Duration) {
771774
act, exp,
772775
)
773776
}
774-
case <-time.After(100 * time.Millisecond):
777+
case <-time.After(200 * time.Millisecond):
775778
t.Fatalf("%s: no timer reset", caller())
776779
}
777780
}

0 commit comments

Comments
 (0)