mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 05:47:27 -08:00
fix flaky tests: TestDisableAutoCompactions,TestBlockRanges (#472)
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
This commit is contained in:
parent
cbfda5a801
commit
a2779cc901
|
@ -733,7 +733,7 @@ func TestDisableAutoCompactions(t *testing.T) {
|
|||
case db.compactc <- struct{}{}:
|
||||
default:
|
||||
}
|
||||
for x := 0; x < 20; x++ {
|
||||
for x := 0; x < 100; x++ {
|
||||
if len(db.Blocks()) > 0 {
|
||||
break
|
||||
}
|
||||
|
|
|
@ -1493,7 +1493,7 @@ func TestBlockRanges(t *testing.T) {
|
|||
|
||||
testutil.Ok(t, err)
|
||||
testutil.Ok(t, app.Commit())
|
||||
for x := 1; x < 10; x++ {
|
||||
for x := 0; x < 100; x++ {
|
||||
if len(db.Blocks()) == 2 {
|
||||
break
|
||||
}
|
||||
|
@ -1533,7 +1533,7 @@ func TestBlockRanges(t *testing.T) {
|
|||
_, err = app.Add(lbl, thirdBlockMaxt+rangeToTriggercompaction, rand.Float64()) // Trigger a compaction
|
||||
testutil.Ok(t, err)
|
||||
testutil.Ok(t, app.Commit())
|
||||
for x := 1; x < 10; x++ {
|
||||
for x := 0; x < 100; x++ {
|
||||
if len(db.Blocks()) == 4 {
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue