MCPcopy Create free account
hub / github.com/couchbase/cbft / TestPartitioning

Function TestPartitioning

pindex_bleve_test.go:175–202  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

173}
174
175func TestPartitioning(t *testing.T) {
176 sourceParams := "{\"numPartitions\":2}"
177 planParams := cbgt.PlanParams{
178 MaxPartitionsPerPIndex: 1,
179 }
180 expectedNumPIndexes := 2
181 expectedNumStreams := 2
182 testPartitioning(t, sourceParams, planParams,
183 expectedNumPIndexes, expectedNumStreams, nil)
184
185 sourceParams = "{\"numPartitions\":10}"
186 planParams = cbgt.PlanParams{
187 MaxPartitionsPerPIndex: 1,
188 }
189 expectedNumPIndexes = 10
190 expectedNumStreams = 10
191 testPartitioning(t, sourceParams, planParams,
192 expectedNumPIndexes, expectedNumStreams, nil)
193
194 sourceParams = "{\"numPartitions\":5}"
195 planParams = cbgt.PlanParams{
196 MaxPartitionsPerPIndex: 2,
197 }
198 expectedNumPIndexes = 3
199 expectedNumStreams = 5
200 testPartitioning(t, sourceParams, planParams,
201 expectedNumPIndexes, expectedNumStreams, nil)
202}
203
204func TestPartitioningMutations(t *testing.T) {
205 sourceParams := "{\"numPartitions\":2}"

Callers

nothing calls this directly

Calls 1

testPartitioningFunction · 0.85

Tested by

no test coverage detected