peterxcli commented on code in PR #8936:
URL: https://github.com/apache/ozone/pull/8936#discussion_r2303310504


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestFailureHandlingByClient.java:
##########
@@ -155,24 +161,36 @@ private void init() throws Exception {
     objectStore.getVolume(volumeName).createBucket(bucketName);
   }
 
-  private void startCluster() throws Exception {
-    init();
+  @BeforeEach
+  public void restartDownDataNodes() throws Exception {
+    if (restartDataNodes.isEmpty()) {
+      return;
+    }
+    for (DatanodeDetails dataNode : restartDataNodes) {
+      cluster.restartHddsDatanode(dataNode, false);
+    }
+    restartDataNodes.clear();
+    cluster.waitForClusterToBeReady();
   }
 
   /**
    * Shutdown MiniDFSCluster.
    */
-  @AfterEach
+  @AfterAll
   public void shutdown() {
     IOUtils.closeQuietly(client);
     if (cluster != null) {
       cluster.shutdown();
     }
   }
 
+// This test case must run first to avoid resetting the container.

Review Comment:
   Maybe we should remove the assertion 
   ```java
   assertEquals(1, containerData1.getBlockCount()); 
   assertEquals(chunkSize * block1NumChunks, containerData1.getBytesUsed()); 
   ```
   and
   ```java
   assertEquals(expectedBlockSize, containerData2.getBytesUsed()); 
   ```



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestFailureHandlingByClient.java:
##########
@@ -155,24 +161,36 @@ private void init() throws Exception {
     objectStore.getVolume(volumeName).createBucket(bucketName);
   }
 
-  private void startCluster() throws Exception {
-    init();
+  @BeforeEach
+  public void restartDownDataNodes() throws Exception {
+    if (restartDataNodes.isEmpty()) {
+      return;
+    }
+    for (DatanodeDetails dataNode : restartDataNodes) {
+      cluster.restartHddsDatanode(dataNode, false);
+    }
+    restartDataNodes.clear();
+    cluster.waitForClusterToBeReady();
   }
 
   /**
    * Shutdown MiniDFSCluster.
    */
-  @AfterEach
+  @AfterAll
   public void shutdown() {
     IOUtils.closeQuietly(client);
     if (cluster != null) {
       cluster.shutdown();
     }
   }
 
+// This test case must run first to avoid resetting the container.

Review Comment:
   May I ask which error you encounter if you removed the order ? I believe the 
error is in the `testBlockCountOnFailures`
   
   
https://github.com/apache/ozone/blob/fce1821ce6e2c503f5a8ca88653a3e3a021c9ecf/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestFailureHandlingByClient.java#L220-L314



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