Repository: accumulo Updated Branches: refs/heads/1.6.0-SNAPSHOT 15e4f002f -> b3c893671
ACCUMULO-2760 just wait for the tserver to die if the wait was long; timeout means it failed to die Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b3c89367 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b3c89367 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b3c89367 Branch: refs/heads/1.6.0-SNAPSHOT Commit: b3c893671ff039836251fc6c33b9522690a4dda5 Parents: 15e4f00 Author: Eric C. Newton <eric.new...@gmail.com> Authored: Wed Apr 30 12:15:38 2014 -0400 Committer: Eric C. Newton <eric.new...@gmail.com> Committed: Wed Apr 30 12:15:38 2014 -0400 ---------------------------------------------------------------------- .../accumulo/test/functional/HalfDeadTServerIT.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3c89367/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java b/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java index d235545..af7b329 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java @@ -97,7 +97,7 @@ public class HalfDeadTServerIT extends ConfigurableMacIT { @Test public void testTimeout() throws Exception { - String results = test(40); + String results = test(20); if (results != null) { if (!results.contains("Session expired")) { System.out.println("Failed to find Session expired in"); @@ -164,21 +164,24 @@ public class HalfDeadTServerIT extends ConfigurableMacIT { VerifyIngest.verifyIngest(c, vopts, SOPTS); } else { UtilWaitThread.sleep(5 * 1000); + tserver.waitFor(); + t.join(); + tserver = null; } // verify the process was blocked String results = t.toString(); assertTrue(results.contains("sleeping\nsleeping\nsleeping\n")); - assertTrue(results.contains("Zookeeper error, will retry")); return results; } finally { if (ingest != null) { ingest.destroy(); ingest.waitFor(); } - tserver.destroy(); - tserver.waitFor(); - t.join(); - UtilWaitThread.sleep(1000); + if (tserver != null) { + tserver.destroy(); + tserver.waitFor(); + t.join(); + } } }