You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/02/23 00:21:18 UTC

[GitHub] bharatviswa504 commented on a change in pull request #512: HDDS-1158. TestOzoneManagerHA.testTwoOMNodesDown is failing with ratis error.

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_r259551047
 
 

 ##########
 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:
   Hi @hanishakoneru 
   This will be fixed, when we have client have finding the leader and have retry logic?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org