You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zg...@apache.org on 2020/07/16 09:01:33 UTC

[hbase] branch branch-2.2 updated: HBASE-24467 Backport HBASE-23963: Split TestFromClientSide; it takes too long to complete timing out (addendum) (#2073)

This is an automated email from the ASF dual-hosted git repository.

zghao pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
     new dce9334  HBASE-24467 Backport HBASE-23963: Split TestFromClientSide; it takes too long to complete timing out (addendum) (#2073)
dce9334 is described below

commit dce93343bb2cb8fbb12e3e7c0408451a619176ce
Author: Guanghao Zhang <zg...@apache.org>
AuthorDate: Thu Jul 16 17:01:16 2020 +0800

    HBASE-24467 Backport HBASE-23963: Split TestFromClientSide; it takes too long to complete timing out (addendum) (#2073)
    
    Signed-off-by: meiyi <my...@gmail.com>
---
 .../java/org/apache/hadoop/hbase/HBaseCommonTestingUtility.java    | 2 +-
 .../java/org/apache/hadoop/hbase/client/FromClientSideBase.java    | 3 +--
 .../java/org/apache/hadoop/hbase/client/TestFromClientSide.java    | 7 +++----
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseCommonTestingUtility.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseCommonTestingUtility.java
index 830fb3c..122dd2a 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseCommonTestingUtility.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseCommonTestingUtility.java
@@ -155,7 +155,7 @@ public class HBaseCommonTestingUtility {
     return new Path(getBaseTestDir(), getRandomUUID().toString());
   }
 
-  public static UUID getRandomUUID() {
+  public UUID getRandomUUID() {
     return new UUID(ThreadLocalRandom.current().nextLong(),
                     ThreadLocalRandom.current().nextLong());
   }
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/FromClientSideBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/FromClientSideBase.java
index 4e3cba5..75378b7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/FromClientSideBase.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/FromClientSideBase.java
@@ -30,7 +30,6 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.CompareOperator;
-import org.apache.hadoop.hbase.HBaseCommonTestingUtility;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionLocation;
@@ -152,7 +151,7 @@ class FromClientSideBase {
   protected void putRows(Table ht, int numRows, String value, String key)
     throws IOException {
     for (int i = 0; i < numRows; i++) {
-      String row = key + "_" + HBaseCommonTestingUtility.getRandomUUID().toString();
+      String row = key + "_" + TEST_UTIL.getRandomUUID().toString();
       System.out.println(String.format("Saving row: %s, with value %s", row,
         value));
       Put put = new Put(Bytes.toBytes(row));
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
index 2a6a78d..0064950 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
@@ -36,7 +36,6 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.HBaseClassTestRule;
-import org.apache.hadoop.hbase.HBaseCommonTestingUtility;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HConstants;
@@ -314,9 +313,9 @@ public class TestFromClientSide extends FromClientSideBase {
     try (Table ht = TEST_UTIL.createTable(tableName, FAMILIES)) {
       String value = "this is the value";
       String value2 = "this is some other value";
-      String keyPrefix1 = HBaseCommonTestingUtility.getRandomUUID().toString();
-      String keyPrefix2 = HBaseCommonTestingUtility.getRandomUUID().toString();
-      String keyPrefix3 = HBaseCommonTestingUtility.getRandomUUID().toString();
+      String keyPrefix1 = TEST_UTIL.getRandomUUID().toString();
+      String keyPrefix2 = TEST_UTIL.getRandomUUID().toString();
+      String keyPrefix3 = TEST_UTIL.getRandomUUID().toString();
       putRows(ht, 3, value, keyPrefix1);
       putRows(ht, 3, value, keyPrefix2);
       putRows(ht, 3, value, keyPrefix3);