Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
fix flaky tests: TestDisableAutoCompactions,TestBlockRanges (#472)
Browse files Browse the repository at this point in the history
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
  • Loading branch information
krasi-georgiev authored Dec 12, 2018
1 parent cbfda5a commit a2779cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit a2779cc

Please sign in to comment.