From 9a8c9bc5c0938262c6ae4baf301c18d10a6ef0f4 Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:35:25 +0100 Subject: [PATCH] Flaky TestTickSkip: Remove inherently flaky test (#17504) Signed-off-by: Rohit Nayak --- go/timer/randticker_test.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/go/timer/randticker_test.go b/go/timer/randticker_test.go index 59bcd1d89ea..7acdbf3156a 100644 --- a/go/timer/randticker_test.go +++ b/go/timer/randticker_test.go @@ -43,21 +43,3 @@ func TestTick(t *testing.T) { t.Error("Channel was not closed") } } - -func TestTickSkip(t *testing.T) { - tkr := NewRandTicker(10*time.Millisecond, 1*time.Millisecond) - time.Sleep(35 * time.Millisecond) - end := <-tkr.C - diff := time.Since(end) - if diff < 20*time.Millisecond { - t.Errorf("diff: %v, want >20ms", diff) - } - - // This tick should be up-to-date - end = <-tkr.C - diff = time.Since(end) - if diff > 1*time.Millisecond { - t.Errorf("diff: %v, want <1ms", diff) - } - tkr.Stop() -}