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:46:32 UTC

[hbase] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new bf869de  HBASE-24428 : Fix for testSplitCompactWithPriority (ADDENDUM)
bf869de is described below

commit bf869def43668df390df0c230a3342623de4f3f5
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 a842530..3ad0c1e 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
@@ -324,8 +324,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);
@@ -357,6 +359,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 {