Repository: hadoop
Updated Branches:
  refs/heads/ozone-0.3 abfd4ffdc -> d08a53877
  refs/heads/trunk c3d22d3b4 -> 03d66b1f5


HDDS-590. Add unit test for HDDS-583. Contributed by Namit Maheshwari.


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

Branch: refs/heads/trunk
Commit: 03d66b1f5d8936e8006b87511af7a647ed1c3fcd
Parents: c3d22d3
Author: Arpit Agarwal <[email protected]>
Authored: Tue Oct 9 11:04:43 2018 -0700
Committer: Arpit Agarwal <[email protected]>
Committed: Tue Oct 9 11:04:43 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/hadoop/blob/03d66b1f/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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to