Fix flaky test: ThriftTransactionServerTest#testThriftServerRestart

Signed-off-by: poorna <[email protected]>


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

Branch: refs/heads/master
Commit: cd251d3953e8d83287c898223642a50857bb318d
Parents: b9eae01
Author: Ali Anwar <[email protected]>
Authored: Thu Sep 8 14:29:27 2016 -0700
Committer: poorna <[email protected]>
Committed: Thu Sep 8 22:08:52 2016 -0700

----------------------------------------------------------------------
 .../apache/tephra/distributed/ThriftTransactionServerTest.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/cd251d39/tephra-core/src/test/java/org/apache/tephra/distributed/ThriftTransactionServerTest.java
----------------------------------------------------------------------
diff --git 
a/tephra-core/src/test/java/org/apache/tephra/distributed/ThriftTransactionServerTest.java
 
b/tephra-core/src/test/java/org/apache/tephra/distributed/ThriftTransactionServerTest.java
index bbe03ed..4f9a79f 100644
--- 
a/tephra-core/src/test/java/org/apache/tephra/distributed/ThriftTransactionServerTest.java
+++ 
b/tephra-core/src/test/java/org/apache/tephra/distributed/ThriftTransactionServerTest.java
@@ -96,6 +96,7 @@ public class ThriftTransactionServerTest {
     conf.setLong(TxConstants.Service.CFG_DATA_TX_CLIENT_TIMEOUT, 
TimeUnit.HOURS.toMillis(1));
     conf.setInt(TxConstants.Service.CFG_DATA_TX_SERVER_IO_THREADS, 2);
     conf.setInt(TxConstants.Service.CFG_DATA_TX_SERVER_THREADS, 4);
+    conf.setInt(TxConstants.HBase.ZK_SESSION_TIMEOUT, 10000);
 
     injector = Guice.createInjector(
       new ConfigModule(conf),
@@ -235,7 +236,7 @@ public class ThriftTransactionServerTest {
   }
 
   private void waitFor(String errorMessage, Callable<Boolean> callable) throws 
Exception {
-    for (int i = 0; i < 200; i++) {
+    for (int i = 0; i < 600; i++) {
       boolean value = callable.call();
       if (value) {
         return;

Reply via email to