fix flaky tests: TestDisableAutoCompactions,TestBlockRanges (#472)

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
pull/5805/head
Krasi Georgiev 6 years ago committed by GitHub
parent cbfda5a801
commit a2779cc901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save