Skip to content

Commit

Permalink
feat: Fix up some tests that I forgot to adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
devanbenz committed Dec 18, 2024
1 parent 403d888 commit 23d12e1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tsdb/engine/tsm1/compact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2501,9 +2501,9 @@ func TestDefaultPlanner_FullyCompacted_SmallSingleGeneration(t *testing.T) {
require.Equal(t, int64(0), cgLen, "compaction group length; Plan()")

cgroup, cgLen, genLen := cp.PlanOptimize()
require.Equal(t, []tsm1.CompactionGroup(nil), cgroup, "compaction group")
require.Equal(t, int64(0), cgLen, "compaction group length")
require.Equal(t, int64(0), genLen, "generation count")
require.Equal(t, len(data), cgroup, "compaction group")
require.Equal(t, int64(4), cgLen, "compaction group length")
require.Equal(t, int64(1), genLen, "generation count")
}

// This test is added to account for halting state after
Expand Down Expand Up @@ -2621,10 +2621,9 @@ func TestDefaultPlanner_FullyCompacted_LargeSingleGenerationUnderAggressiveBlock
_, cgLen = cp.Plan(time.Now().Add(-1))
require.Equal(t, int64(0), cgLen, "compaction group length; Plan()")

cgroup, cgLen, genLen := cp.PlanOptimize()
require.Equal(t, []tsm1.CompactionGroup(nil), cgroup, "compaction group")
require.Equal(t, int64(0), cgLen, "compaction group length")
require.Equal(t, int64(0), genLen, "generation count")
_, cgLen, genLen := cp.PlanOptimize()
require.Equal(t, int64(8), cgLen, "compaction group length")
require.Equal(t, int64(1), genLen, "generation count")
}

// This test is added to account for a single generation that has a group size
Expand Down

0 comments on commit 23d12e1

Please sign in to comment.