From e0358566b9cc35d9011925c0157eefebd5ddbb2d Mon Sep 17 00:00:00 2001 From: Elliott Clark Date: Mon, 12 Aug 2013 15:24:34 -0700 Subject: [PATCH] Make sure to close the Chaos monkey on error. --- .../test/IntegrationTestBigLinkedListWithChaosMonkey.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithChaosMonkey.java hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithChaosMonkey.java index bb7cdb4..60cfacc 100644 --- hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithChaosMonkey.java +++ hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithChaosMonkey.java @@ -128,10 +128,16 @@ public class IntegrationTestBigLinkedListWithChaosMonkey extends IntegrationTest test.NUM_SLAVES_BASE = 3; test.setUp(); - // run the test - int ret = ToolRunner.run(test.getTestingUtil().getConfiguration(), test, args); + int ret = -1; + + try { + // run the test + ret = ToolRunner.run(test.getTestingUtil().getConfiguration(), test, args); + }finally { + // Make 100% sure that the monkey stops. + test.tearDown(); + } - test.tearDown(); System.exit(ret); } } -- 1.7.10.2 (Apple Git-33)