saurabhd336 commented on code in PR #8828:
URL: https://github.com/apache/pinot/pull/8828#discussion_r935176283


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java:
##########
@@ -2366,16 +2382,56 @@ public void testJDBCClient()
     Assert.assertTrue(resultSet.getLong(1) > 0);
   }
 
-  private java.sql.Connection getJDBCConnectionFromController(int 
controllerPort) throws Exception {
+  private java.sql.Connection getJDBCConnectionFromController(int 
controllerPort)
+      throws Exception {
     PinotDriver pinotDriver = new PinotDriver();
     Properties jdbcProps = new Properties();
     return pinotDriver.connect("jdbc:pinot://localhost:" + controllerPort, 
jdbcProps);
   }
 
-  private java.sql.Connection getJDBCConnectionFromBrokers(int controllerPort, 
int brokerPort) throws Exception {
+  private java.sql.Connection getJDBCConnectionFromBrokers(int controllerPort, 
int brokerPort)
+      throws Exception {
     PinotDriver pinotDriver = new PinotDriver();
     Properties jdbcProps = new Properties();
     jdbcProps.put(PinotConnection.BROKER_LIST, "localhost:" + brokerPort);
     return pinotDriver.connect("jdbc:pinot://localhost:" + controllerPort, 
jdbcProps);
   }
+
+  private String reloadOfflineTableAndValidateResponse(String tableName, 
boolean forceDownload) {
+    String jobId = null;
+    try {
+      String response =
+          
sendPostRequest(_controllerRequestURLBuilder.forTableReload(tableName, 
TableType.OFFLINE, forceDownload),
+              null);
+      String tableNameWithType = 
TableNameBuilder.OFFLINE.tableNameWithType(tableName);
+      JsonNode tableLevelDetails =
+          
JsonUtils.stringToJsonNode(StringEscapeUtils.unescapeJava(response.split(": 
")[1])).get(tableNameWithType);
+      String isZKWriteSuccess = 
tableLevelDetails.get("reloadJobMetaZKStorageStatus").asText();
+
+      if (isZKWriteSuccess.equals("SUCCESS")) {

Review Comment:
   ack. I was hoping to avoid cases where ZK metadata write fails, and we 
unnecessarily fail the test even though reload job was successful. But I guess 
it makes sense to validate the ZK write as well.



-- 
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

Reply via email to