fix flaky tests: TestDisableAutoCompactions,TestBlockRanges (#472)

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
This commit is contained in:
Krasi Georgiev 2018-12-12 14:49:03 +03:00 committed by GitHub
parent cbfda5a801
commit a2779cc901
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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
}

View file

@ -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
}