From 5981dc4511eb53bfc6c79635cf29880b0d642fdc Mon Sep 17 00:00:00 2001 From: Andrew Kyle Purtell Date: Tue, 10 Dec 2013 22:58:45 +0000 Subject: [PATCH] Amend HBASE-10103. Fix testHealthCheckerTimeout and add default test timeouts git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1549994 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/hadoop/hbase/TestNodeHealthCheckChore.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNodeHealthCheckChore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNodeHealthCheckChore.java index 1e04175a5e3..27781223b21 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNodeHealthCheckChore.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNodeHealthCheckChore.java @@ -56,21 +56,21 @@ public class TestNodeHealthCheckChore { if (!fs.mkdirs(testDir)) throw new IOException("Failed mkdir " + testDir); } - @Test + @Test(timeout=60000) public void testHealthCheckerSuccess() throws Exception { String normalScript = "echo \"I am all fine\""; healthCheckerTest(normalScript, HealthCheckerExitStatus.SUCCESS); } - @Test + @Test(timeout=60000) public void testHealthCheckerFail() throws Exception { String errorScript = "echo ERROR" + eol + "echo \"Node not healthy\""; healthCheckerTest(errorScript, HealthCheckerExitStatus.FAILED); } - @Test + @Test(timeout=60000) public void testHealthCheckerTimeout() throws Exception { - String timeOutScript = "sleep " + (SCRIPT_TIMEOUT * 2) + eol + "echo \"I am fine\""; + String timeOutScript = "sleep 10" + eol + "echo \"I am fine\""; healthCheckerTest(timeOutScript, HealthCheckerExitStatus.TIMED_OUT); } @@ -93,7 +93,7 @@ public class TestNodeHealthCheckChore { this.healthScriptFile.delete(); } - @Test + @Test(timeout=60000) public void testRSHealthChore() throws Exception{ Stoppable stop = new StoppableImplementation(); Configuration conf = getConfForNodeHealthScript();