bharatviswa504 commented on a change in pull request #512: HDDS-1158. 
TestOzoneManagerHA.testTwoOMNodesDown is failing with ratis error.
URL: https://github.com/apache/hadoop/pull/512#discussion_r259585796
 
 

 ##########
 File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHA.java
 ##########
 @@ -150,17 +152,27 @@ private void testCreateVolume(boolean checkSuccess) 
throws Exception {
     createVolumeArgs.setUserName(userName);
     createVolumeArgs.setAdminName(adminName);
 
-    storageHandler.createVolume(createVolumeArgs);
+    try {
+      storageHandler.createVolume(createVolumeArgs);
 
-    VolumeArgs getVolumeArgs = new VolumeArgs(volumeName, userArgs);
-    VolumeInfo retVolumeinfo = storageHandler.getVolumeInfo(getVolumeArgs);
+      VolumeArgs getVolumeArgs = new VolumeArgs(volumeName, userArgs);
+      VolumeInfo retVolumeinfo = storageHandler.getVolumeInfo(getVolumeArgs);
 
-    if (checkSuccess) {
-      Assert.assertTrue(retVolumeinfo.getVolumeName().equals(volumeName));
-      Assert.assertTrue(retVolumeinfo.getOwner().getName().equals(userName));
-    } else {
-      // Verify that the request failed
-      Assert.assertTrue(retVolumeinfo.getVolumeName().isEmpty());
+      if (checkSuccess) {
+        Assert.assertTrue(retVolumeinfo.getVolumeName().equals(volumeName));
+        Assert.assertTrue(retVolumeinfo.getOwner().getName().equals(userName));
+      } else {
+        // Verify that the request failed
+        Assert.assertTrue(retVolumeinfo.getVolumeName().isEmpty());
+        Assert.fail("There is no quorum. Request should have failed");
+      }
+    } catch (OMException e) {
+      if (!checkSuccess) {
+        GenericTestUtils.assertExceptionContains(
+            "RaftRetryFailureException", e);
 
 Review comment:
   Yes, my bad. So I think now it LGTM. Thank You @hanishakoneru  for the 
clarification.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to