Skip to content

Commit

Permalink
e2e: fix compact test's flakiness (#5246)
Browse files Browse the repository at this point in the history
Fix the compact test's by running this sub-test sequentially. The
further steps depend on this test's results so it's wrong to run it as a
sub-test.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
  • Loading branch information
GiedriusS authored Mar 18, 2022
1 parent 9336076 commit 149e026
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/e2e/compact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,8 @@ func testCompactWithStoreGateway(t *testing.T, penaltyDedup bool) {
testutil.Ok(t, str.WaitSumMetrics(e2e.Equals(0), "thanos_blocks_meta_modified"))
}

t.Run("dedup enabled; no delete delay; compactor should work and remove things as expected", func(t *testing.T) {
// dedup enabled; no delete delay; compactor should work and remove things as expected.
{
extArgs := []string{"--deduplication.replica-label=replica", "--deduplication.replica-label=rule_replica", "--delete-delay=0s"}
if penaltyDedup {
extArgs = append(extArgs, "--deduplication.func=penalty")
Expand Down Expand Up @@ -805,7 +806,7 @@ func testCompactWithStoreGateway(t *testing.T, penaltyDedup bool) {
testutil.Ok(t, str.WaitSumMetrics(e2e.Equals(float64(len(rawBlockIDs)+8-18+6-2+2)), "thanos_blocks_meta_synced"))
testutil.Ok(t, str.WaitSumMetrics(e2e.Equals(0), "thanos_blocks_meta_sync_failures_total"))
testutil.Ok(t, str.WaitSumMetrics(e2e.Equals(0), "thanos_blocks_meta_modified"))
})
}

// Ensure that querying downsampled blocks works. Then delete the raw block and try querying again.
{
Expand Down

0 comments on commit 149e026

Please sign in to comment.