You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by xy...@apache.org on 2018/05/09 17:40:58 UTC
[20/26] hadoop git commit: HDDS-33. Ozone : Fix the test logic in
TestKeySpaceManager#testDeleteKey. Contributed by Shashikant Banerjee.
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/HDDS-4
Commit: 809135082a04208f586ba7fbce705668eb559007
Parents: 8981674
Author: Mukul Kumar Singh <ms...@apache.org>
Authored: Wed May 9 10:21:41 2018 +0530
Committer: Mukul Kumar Singh <ms...@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