File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 66
77 "github.com/oklog/ulid"
88 "github.com/prometheus/client_golang/prometheus"
9+ "github.com/prometheus/client_golang/prometheus/promauto"
910 "github.com/prometheus/prometheus/tsdb"
1011 "github.com/stretchr/testify/assert"
1112 "github.com/stretchr/testify/require"
@@ -142,14 +143,20 @@ func TestShuffleShardingGrouper_Groups(t *testing.T) {
142143 BlockRanges : testData .ranges ,
143144 }
144145
146+ registerer := prometheus .NewRegistry ()
147+ remainingPlannedCompactions := promauto .With (registerer ).NewGauge (prometheus.GaugeOpts {
148+ Name : "cortex_compactor_remaining_planned_compactions" ,
149+ Help : "Total number of plans that remain to be compacted." ,
150+ })
151+
145152 g := NewShuffleShardingGrouper (nil ,
146153 nil ,
147154 false , // Do not accept malformed indexes
148155 true , // Enable vertical compaction
149- prometheus .NewRegistry (),
150- nil ,
156+ registerer ,
151157 nil ,
152158 nil ,
159+ remainingPlannedCompactions ,
153160 metadata .NoneFunc ,
154161 * compactorCfg )
155162 actual , err := g .Groups (testData .blocks )
You can’t perform that action at this time.
0 commit comments