Skip to content

Commit

Permalink
[release-19.0] Flaky TestTickSkip: Remove inherently flaky test (#17504
Browse files Browse the repository at this point in the history
…) (#17511)

Signed-off-by: Rohit Nayak <[email protected]>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
  • Loading branch information
vitess-bot[bot] authored Jan 13, 2025
1 parent fb5de73 commit 7c6ff29
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions go/timer/randticker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

0 comments on commit 7c6ff29

Please sign in to comment.