diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java index 8f530491fc..573f097e34 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java @@ -249,6 +249,8 @@ public void testDeleteVolume() throws Exception { String[] args = new String[] {"-deleteVolume", url + "/" + volumeName, "-root"}; assertEquals(0, ToolRunner.run(shell, args)); + String output = out.toString(); + assertTrue(output.contains("Volume " + volumeName + " is deleted")); // verify if volume has been deleted try { diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/DeleteVolumeHandler.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/DeleteVolumeHandler.java index d6facf63a2..2df788a937 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/DeleteVolumeHandler.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/DeleteVolumeHandler.java @@ -67,5 +67,6 @@ protected void execute(CommandLine cmd) } client.getObjectStore().deleteVolume(volumeName); + System.out.printf("Volume %s is deleted%n", volumeName); } }