hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [2/2] hadoop git commit: HDDS-590. Add unit test for HDDS-583. Contributed by Namit Maheshwari.
Date Tue, 09 Oct 2018 18:05:36 GMT
HDDS-590. Add unit test for HDDS-583. Contributed by Namit Maheshwari.

(cherry picked from commit 03d66b1f5d8936e8006b87511af7a647ed1c3fcd)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d08a5387
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d08a5387
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d08a5387

Branch: refs/heads/ozone-0.3
Commit: d08a5387778a85e7f47d76ad47da775caa55e489
Parents: abfd4ff
Author: Arpit Agarwal <arp@apache.org>
Authored: Tue Oct 9 11:04:43 2018 -0700
Committer: Arpit Agarwal <arp@apache.org>
Committed: Tue Oct 9 11:05:23 2018 -0700

----------------------------------------------------------------------
 .../hadoop/ozone/TestStorageContainerManager.java      | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d08a5387/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
----------------------------------------------------------------------
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
index ac3ad5d..c3c5d04 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
@@ -58,6 +58,7 @@ import org.apache.hadoop.ozone.om.helpers.OmKeyLocationInfo;
 import org.apache.hadoop.ozone.protocol.commands.DeleteBlocksCommand;
 import org.apache.hadoop.ozone.protocol.commands.SCMCommand;
 import org.apache.hadoop.test.GenericTestUtils;
+import org.apache.hadoop.util.ExitUtil;
 import org.junit.Assert;
 import org.junit.Rule;
 import org.junit.Test;
@@ -437,6 +438,18 @@ public class TestStorageContainerManager {
   }
 
   @Test
+  public void testSCMInitializationReturnCode() throws IOException {
+    ExitUtil.disableSystemExit();
+    OzoneConfiguration conf = new OzoneConfiguration();
+    conf.setBoolean(OzoneConfigKeys.OZONE_ENABLED, true);
+    // Set invalid args
+    String[] invalidArgs = {"--zxcvbnm"};
+    exception.expect(ExitUtil.ExitException.class);
+    exception.expectMessage("ExitException");
+    StorageContainerManager.createSCM(invalidArgs, conf);
+  }
+
+  @Test
   public void testScmInfo() throws Exception {
     OzoneConfiguration conf = new OzoneConfiguration();
     final String path =


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


Mime
View raw message