diff --git a/hadoop-hdds/hadoop-dependency-client/pom.xml b/hadoop-hdds/hadoop-dependency-client/pom.xml
index 489e1b3ddf5..7676f1f45f1 100644
--- a/hadoop-hdds/hadoop-dependency-client/pom.xml
+++ b/hadoop-hdds/hadoop-dependency-client/pom.xml
@@ -59,10 +59,7 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
com.google.guava
guava
-
- commons-cli
- commons-cli
-
+
org.apache.commons
commons-math3
diff --git a/hadoop-ozone/ozonefs-common/pom.xml b/hadoop-ozone/ozonefs-common/pom.xml
index 2b79beae35e..18839deaee5 100644
--- a/hadoop-ozone/ozonefs-common/pom.xml
+++ b/hadoop-ozone/ozonefs-common/pom.xml
@@ -112,35 +112,10 @@
-
- org.apache.ozone
- hdds-container-service
- test
-
org.apache.ozone
hdds-hadoop-dependency-test
test
-
- org.apache.ozone
- hdds-server-framework
- test
-
-
- org.apache.ozone
- hdds-server-scm
- test
-
-
- org.apache.ozone
- hdds-test-utils
- test
-
-
- org.apache.ozone
- ozone-manager
- test
-
diff --git a/hadoop-ozone/ozonefs-common/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsShell.java b/hadoop-ozone/ozonefs-common/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsShell.java
index a15da5228f3..96506933952 100644
--- a/hadoop-ozone/ozonefs-common/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsShell.java
+++ b/hadoop-ozone/ozonefs-common/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsShell.java
@@ -22,7 +22,6 @@
import org.apache.hadoop.util.ToolRunner;
import java.io.ByteArrayOutputStream;
-import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
@@ -32,7 +31,6 @@
import org.junit.jupiter.api.Test;
-
/**
* Tests the behavior of OzoneFsShell.
*/
@@ -40,7 +38,7 @@ public class TestOzoneFsShell {
// tests command handler for FsShell bound to OzoneDelete class
@Test
- public void testOzoneFsShellRegisterDeleteCmd() throws IOException {
+ public void testOzoneFsShellRegisterDeleteCmd() throws Exception {
final String rmCmdName = "rm";
final String rmCmd = "-" + rmCmdName;
final String arg = "arg1";
@@ -52,16 +50,17 @@ public void testOzoneFsShellRegisterDeleteCmd() throws IOException {
System.setErr(bytesPrintStream);
try {
ToolRunner.run(shell, argv);
- } catch (Exception e) {
- } finally {
+
// test command bindings for "rm" command handled by OzoneDelete class
CommandFactory factory = shell.getCommandFactory();
+ assertNotNull(factory);
assertEquals(1, Arrays.stream(factory.getNames())
.filter(c -> c.equals(rmCmd)).count());
Command instance = factory.getInstance(rmCmd);
assertNotNull(instance);
assertEquals(OzoneFsDelete.Rm.class, instance.getClass());
assertEquals(rmCmdName, instance.getCommandName());
+ } finally {
shell.close();
System.setErr(oldErr);
}