hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msi...@apache.org
Subject hadoop git commit: HDDS-33. Ozone : Fix the test logic in TestKeySpaceManager#testDeleteKey. Contributed by Shashikant Banerjee.
Date Wed, 09 May 2018 04:53:03 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 8981674bb -> 809135082


HDDS-33. Ozone : Fix the test logic in TestKeySpaceManager#testDeleteKey. Contributed by Shashikant
Banerjee.


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

Branch: refs/heads/trunk
Commit: 809135082a04208f586ba7fbce705668eb559007
Parents: 8981674
Author: Mukul Kumar Singh <msingh@apache.org>
Authored: Wed May 9 10:21:41 2018 +0530
Committer: Mukul Kumar Singh <msingh@apache.org>
Committed: Wed May 9 10:21:41 2018 +0530

----------------------------------------------------------------------
 .../org/apache/hadoop/ozone/ksm/TestKeySpaceManager.java    | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/80913508/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ksm/TestKeySpaceManager.java
----------------------------------------------------------------------
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ksm/TestKeySpaceManager.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ksm/TestKeySpaceManager.java
index 6478e88..9a116b7 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ksm/TestKeySpaceManager.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ksm/TestKeySpaceManager.java
@@ -642,9 +642,12 @@ public class TestKeySpaceManager {
     Assert.assertEquals(1, list.size());
 
     // Delete the key again to test deleting non-existing key.
-    exception.expect(IOException.class);
-    exception.expectMessage("KEY_NOT_FOUND");
-    storageHandler.deleteKey(keyArgs);
+    try {
+      storageHandler.deleteKey(keyArgs);
+      Assert.fail("Expected exception not thrown.");
+    } catch (IOException ioe) {
+      Assert.assertTrue(ioe.getMessage().contains("KEY_NOT_FOUND"));
+    }
     Assert.assertEquals(1 + numKeyDeleteFails,
         ksmMetrics.getNumKeyDeletesFails());
   }


---------------------------------------------------------------------
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