You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2017/11/14 00:00:58 UTC

hbase git commit: HBASE-19237: TestMaster.testMasterOpsWhileSplitting fails

Repository: hbase
Updated Branches:
  refs/heads/master df82abb15 -> 80741e31e


HBASE-19237: TestMaster.testMasterOpsWhileSplitting fails

Signed-off-by: tedyu <yu...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/80741e31
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/80741e31
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/80741e31

Branch: refs/heads/master
Commit: 80741e31e8259dba6fc4181726394c6dbd56f026
Parents: df82abb
Author: Yi Liang <yl...@us.ibm.com>
Authored: Fri Nov 10 14:43:46 2017 -0800
Committer: tedyu <yu...@gmail.com>
Committed: Mon Nov 13 16:00:48 2017 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/master/TestMaster.java | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/80741e31/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMaster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMaster.java
index c4163d5..eed793f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMaster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMaster.java
@@ -107,15 +107,13 @@ public class TestMaster {
     // Now trigger a split and stop when the split is in progress
     LOG.info("Splitting table");
     TEST_UTIL.getAdmin().split(TABLENAME);
-    LOG.info("Waiting for split result to be about to open");
-    RegionStates regionStates = m.getAssignmentManager().getRegionStates();
-    while (regionStates.getRegionsOfTable(TABLENAME).size() <= 1) {
+
+    LOG.info("Making sure we can call getTableRegions while opening");
+    while (tableRegions.size() < 3) {
+      tableRegions = MetaTableAccessor.getTableRegionsAndLocations(m.getConnection(),
+          TABLENAME, false);
       Thread.sleep(100);
     }
-    LOG.info("Making sure we can call getTableRegions while opening");
-    tableRegions = MetaTableAccessor.getTableRegionsAndLocations(m.getConnection(),
-      TABLENAME, false);
-
     LOG.info("Regions: " + Joiner.on(',').join(tableRegions));
     // We have three regions because one is split-in-progress
     assertEquals(3, tableRegions.size());