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 6
6
7
7
"github.com/oklog/ulid"
8
8
"github.com/prometheus/client_golang/prometheus"
9
+ "github.com/prometheus/client_golang/prometheus/promauto"
9
10
"github.com/prometheus/prometheus/tsdb"
10
11
"github.com/stretchr/testify/assert"
11
12
"github.com/stretchr/testify/require"
@@ -142,14 +143,20 @@ func TestShuffleShardingGrouper_Groups(t *testing.T) {
142
143
BlockRanges : testData .ranges ,
143
144
}
144
145
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
+
145
152
g := NewShuffleShardingGrouper (nil ,
146
153
nil ,
147
154
false , // Do not accept malformed indexes
148
155
true , // Enable vertical compaction
149
- prometheus .NewRegistry (),
150
- nil ,
156
+ registerer ,
151
157
nil ,
152
158
nil ,
159
+ remainingPlannedCompactions ,
153
160
metadata .NoneFunc ,
154
161
* compactorCfg )
155
162
actual , err := g .Groups (testData .blocks )
You can’t perform that action at this time.
0 commit comments