Skip to content

Commit

Permalink
HBASE-22297 Addendum make TestSplitTransactionOnCluster more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Apache9 committed Apr 25, 2019
1 parent e2c5674 commit 792f69e
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.hadoop.conf.Configuration;
Expand Down Expand Up @@ -511,17 +512,13 @@ public void testSplitShouldNotThrowNPEEvenARegionHasEmptySplitFiles() throws Exc
}

/**
* Verifies HBASE-5806. Here the case is that splitting is completed but before the
* CJ could remove the parent region the master is killed and restarted.
* @throws IOException
* @throws InterruptedException
* @throws NodeExistsException
* @throws KeeperException
* Verifies HBASE-5806. Here the case is that splitting is completed but before the CJ could
* remove the parent region the master is killed and restarted.
*/
@Test
public void testMasterRestartAtRegionSplitPendingCatalogJanitor()
throws IOException, InterruptedException, NodeExistsException,
KeeperException, ServiceException {
KeeperException, ServiceException, ExecutionException {
final TableName tableName = TableName.valueOf(name.getMethodName());

// Create table then get the single region for our new table.
Expand All @@ -542,7 +539,7 @@ public void testMasterRestartAtRegionSplitPendingCatalogJanitor()
HRegionServer server = cluster.getRegionServer(tableRegionIndex);
printOutRegions(server, "Initial regions: ");
// Call split.
this.admin.splitRegionAsync(hri.getRegionName());
this.admin.splitRegionAsync(hri.getRegionName()).get();
List<HRegion> daughters = checkAndGetDaughters(tableName);

// Before cleanup, get a new master.
Expand Down

0 comments on commit 792f69e

Please sign in to comment.