You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/05/29 12:56:50 UTC

[hbase] branch branch-2.2 updated: HBASE-24428 : Fix for testSplitCompactWithPriority (ADDENDUM)

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

vjasani 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 de4ee70  HBASE-24428 : Fix for testSplitCompactWithPriority (ADDENDUM)
de4ee70 is described below

commit de4ee70abf7f507aaf3e778bd830e5c04f14b7b2
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Fri May 29 18:05:02 2020 +0530

    HBASE-24428 : Fix for testSplitCompactWithPriority (ADDENDUM)
---
 .../hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java  | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
index a8bd003..f8834ac 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
@@ -319,8 +319,10 @@ public class TestSplitTransactionOnCluster {
     // the procedure will return true; if the split fails, the procedure would throw exception.
     ProcedureTestingUtility.waitProcedure(cluster.getMaster().getMasterProcedureExecutor(),
       procId);
-
-    assertEquals(2, cluster.getRegions(tableName).size());
+    Thread.sleep(3000);
+    assertNotEquals("Table is not split properly?", -1,
+      TESTING_UTIL.waitFor(3000,
+        () -> cluster.getRegions(tableName).size() == 2));
     // we have 2 daughter regions
     HRegion hRegion1 = cluster.getRegions(tableName).get(0);
     HRegion hRegion2 = cluster.getRegions(tableName).get(1);
@@ -352,6 +354,8 @@ public class TestSplitTransactionOnCluster {
     // be accepted.
     assertTrue(compactionContext.get().getRequest().isAfterSplit());
     assertEquals(compactionContext.get().getRequest().getPriority(), Integer.MIN_VALUE + 10);
+    admin.disableTable(tableName);
+    admin.deleteTable(tableName);
   }
 
   public static class FailingSplitMasterObserver implements MasterCoprocessor, MasterObserver {