You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by sa...@apache.org on 2017/03/02 17:31:40 UTC

phoenix git commit: PHOENIX-3702 RenewLeaseIT#testLeaseDoesNotTimeout failing on 4.x-HBase-1.1 and master branches

Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 916c4c4f2 -> 91a436dd3


PHOENIX-3702 RenewLeaseIT#testLeaseDoesNotTimeout failing on 4.x-HBase-1.1 and master branches


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/91a436dd
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/91a436dd
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/91a436dd

Branch: refs/heads/4.x-HBase-1.1
Commit: 91a436dd39c5f8835c3708d207e7103a9313aa5d
Parents: 916c4c4
Author: Samarth <sa...@salesforce.com>
Authored: Thu Mar 2 09:31:30 2017 -0800
Committer: Samarth <sa...@salesforce.com>
Committed: Thu Mar 2 09:31:30 2017 -0800

----------------------------------------------------------------------
 .../src/it/java/org/apache/phoenix/end2end/RenewLeaseIT.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/91a436dd/phoenix-core/src/it/java/org/apache/phoenix/end2end/RenewLeaseIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RenewLeaseIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RenewLeaseIT.java
index d2a5e57..726f24b 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RenewLeaseIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RenewLeaseIT.java
@@ -29,6 +29,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.coprocessor.ObserverContext;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
@@ -43,7 +44,7 @@ import com.google.common.collect.Maps;
 
 
 public class RenewLeaseIT extends BaseUniqueNamesOwnClusterIT {
-    private static final long RPC_TIMEOUT = 2000;
+    private static final long SCANNER_LEASE_TIMEOUT = 12000;
     private static volatile boolean SLEEP_NOW = false;
     private final static String TABLE_NAME = generateUniqueName();
     
@@ -53,7 +54,7 @@ public class RenewLeaseIT extends BaseUniqueNamesOwnClusterIT {
         serverProps.put("hbase.coprocessor.region.classes", SleepingRegionObserver.class.getName());
         Map<String,String> clientProps = Maps.newHashMapWithExpectedSize(1);
         // Must update config before starting server
-        clientProps.put("hbase.rpc.timeout", Long.toString(RPC_TIMEOUT));
+        serverProps.put(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, Long.toString(SCANNER_LEASE_TIMEOUT));
         setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()), new ReadOnlyProps(clientProps.entrySet().iterator()));
     }
     
@@ -81,7 +82,7 @@ public class RenewLeaseIT extends BaseUniqueNamesOwnClusterIT {
                 final int limit, final boolean hasMore) throws IOException {
             try {
                 if (SLEEP_NOW && c.getEnvironment().getRegion().getRegionInfo().getTable().getNameAsString().equals(TABLE_NAME)) {
-                    Thread.sleep(RPC_TIMEOUT * 2);
+                    Thread.sleep(2 * SCANNER_LEASE_TIMEOUT);
                 }
             } catch (InterruptedException e) {
                 throw new IOException(e);