J-HowHuang commented on code in PR #16096:
URL: https://github.com/apache/pinot/pull/16096#discussion_r2164563342


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/TableRebalancePauselessIntegrationTest.java:
##########
@@ -207,171 +205,129 @@ public void testForceCommit()
       rebalanceConfig.setMinAvailableReplicas(0);
       rebalanceConfig.setDowntime(false);
       rebalanceConfig.setIncludeConsuming(true);
-      response = sendPostRequest(getRebalanceUrl(rebalanceConfig, 
TableType.REALTIME));
-      rebalanceResult = JsonUtils.stringToObject(response, 
RebalanceResult.class);
+      // notice that this could get an HTTP 409 CONFLICT, when the test failed 
due to the timeout waiting on the table
+      // to converge, and try to rebalance again here.
+      String response = sendPostRequest(getRebalanceUrl(rebalanceConfig, 
TableType.REALTIME));
+      RebalanceResult rebalanceResult = JsonUtils.stringToObject(response, 
RebalanceResult.class);
       waitForRebalanceToComplete(rebalanceResult.getJobId(), 30000);
-    } finally {
       serverStarter0.stop();
       serverStarter1.stop();
       serverStarter2.stop();
       serverStarter3.stop();
     }
   }
 
-  @Test
-  void testForceCommitStrictReplicaGroup()
-      throws Exception {
-    final String tenantA = "tenantA_strictRG";
-    final String tenantB = "tenantB_strictRG";
-
-    BaseServerStarter serverStarter0 = startOneServer(0);
-    BaseServerStarter serverStarter1 = startOneServer(1);
-    createServerTenant(tenantA, 0, 2);
-
-    BaseServerStarter serverStarter2 = startOneServer(2);
-    BaseServerStarter serverStarter3 = startOneServer(3);
-    createServerTenant(tenantB, 0, 2);
-    try {
-      // Prepare the table to replicate segments across two servers on tenantA
-      TableConfig tableConfig = getRealtimeTableConfig();
-      tableConfig.setRoutingConfig(
-          new RoutingConfig(null, null, 
RoutingConfig.STRICT_REPLICA_GROUP_INSTANCE_SELECTOR_TYPE,
-              false));
-      tableConfig.setTenantConfig(new TenantConfig(getBrokerTenant(), tenantA, 
null));
-      tableConfig.getValidationConfig().setReplication("2");
-      tableConfig.getValidationConfig().setPeerSegmentDownloadScheme("http");
-
-      updateTableConfig(tableConfig);
-
-      RebalanceConfig rebalanceConfig = new RebalanceConfig();
-      rebalanceConfig.setDryRun(false);
-      rebalanceConfig.setIncludeConsuming(true);
-
-      String response = sendPostRequest(getRebalanceUrl(rebalanceConfig, 
TableType.REALTIME));
-      RebalanceResult rebalanceResult = JsonUtils.stringToObject(response, 
RebalanceResult.class);
-      RebalanceSummaryResult summary = 
rebalanceResult.getRebalanceSummaryResult();
-      assertEquals(
-          
summary.getServerInfo().getNumServers().getExpectedValueAfterRebalance(),
-          2);
-      
assertEquals(summary.getSegmentInfo().getConsumingSegmentToBeMovedSummary().getNumConsumingSegmentsToBeMoved(),
-          4);
+  private void waitForRebalanceToComplete(String rebalanceJobId, long 
timeoutMs) {

Review Comment:
   Decided to put this in `BaseClusterIntegrationTest` since most of the 
non-integration tests have direct access to a `TableRebalancer` so they don't 
need this util



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to