somandal commented on code in PR #15617: URL: https://github.com/apache/pinot/pull/15617#discussion_r2085024296
########## pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/PartialUpsertTableRebalanceIntegrationTest.java: ########## @@ -163,6 +163,74 @@ public void testRebalance() "Failed to drop servers"); } + @Test + public void testRebalanceWithBatching() + throws Exception { + populateTables(); + + verifyIdealState(5, NUM_SERVERS); + + // setup the rebalance config + RebalanceConfig rebalanceConfig = new RebalanceConfig(); + rebalanceConfig.setDryRun(false); + rebalanceConfig.setMinAvailableReplicas(0); + rebalanceConfig.setIncludeConsuming(true); + rebalanceConfig.setBatchSizePerServer(1); + + // Add a new server + BaseServerStarter serverStarter1 = startOneServer(NUM_SERVERS); + + // Now we trigger a rebalance operation + TableConfig tableConfig = _resourceManager.getTableConfig(REALTIME_TABLE_NAME); + RebalanceResult rebalanceResult = _tableRebalancer.rebalance(tableConfig, rebalanceConfig, null); + + // Check the number of replicas after rebalancing + int finalReplicas = _resourceManager.getServerInstancesForTable(getTableName(), TableType.REALTIME).size(); + + // Check that a replica has been added Review Comment: copy paste from the other test - and I've fixed up both to call it "server" instead of "replica" -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org