nandakumar131 commented on code in PR #5698:
URL: https://github.com/apache/ozone/pull/5698#discussion_r1409071442


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestGetCommittedBlockLengthAndPutKey.java:
##########
@@ -110,12 +115,21 @@ public void tesGetCommittedBlockLength() throws Exception 
{
         ContainerTestHelper
             .getPutBlockRequest(pipeline, writeChunkRequest.getWriteChunk());
     client.sendCommand(putKeyRequest);
-    response = ContainerProtocolCalls
-        .getCommittedBlockLength(client, blockID, null);
+    GenericTestUtils.waitFor(() -> {
+      boolean success = true;
+      try {
+        response[0] = ContainerProtocolCalls
+            .getCommittedBlockLength(client, blockID, null);
+      } catch (IOException e) {
+        success = false;
+        LOG.error("Ignore the exception till wait: {}", e.getMessage());

Review Comment:
   There is no need to log `error` here. It can be changed to `debug` if this 
will help with debugging in case of failure.



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestGetCommittedBlockLengthAndPutKey.java:
##########
@@ -110,12 +115,21 @@ public void tesGetCommittedBlockLength() throws Exception 
{
         ContainerTestHelper
             .getPutBlockRequest(pipeline, writeChunkRequest.getWriteChunk());
     client.sendCommand(putKeyRequest);
-    response = ContainerProtocolCalls
-        .getCommittedBlockLength(client, blockID, null);
+    GenericTestUtils.waitFor(() -> {
+      boolean success = true;

Review Comment:
   There is no need for a `boolean` variable in this scenario. We can directly 
return `true` or `false` when needed.



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