(t *testing.T)
| 173 | } |
| 174 | |
| 175 | func 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 | |
| 204 | func TestPartitioningMutations(t *testing.T) { |
| 205 | sourceParams := "{\"numPartitions\":2}" |
nothing calls this directly
no test coverage detected