Skip to content

Commit 792f69e

Browse files
committed
HBASE-22297 Addendum make TestSplitTransactionOnCluster more stable
1 parent e2c5674 commit 792f69e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import java.util.Map;
3232
import java.util.Optional;
3333
import java.util.concurrent.CountDownLatch;
34+
import java.util.concurrent.ExecutionException;
3435
import java.util.concurrent.TimeUnit;
3536
import java.util.concurrent.atomic.AtomicBoolean;
3637
import org.apache.hadoop.conf.Configuration;
@@ -511,17 +512,13 @@ public void testSplitShouldNotThrowNPEEvenARegionHasEmptySplitFiles() throws Exc
511512
}
512513

513514
/**
514-
* Verifies HBASE-5806. Here the case is that splitting is completed but before the
515-
* CJ could remove the parent region the master is killed and restarted.
516-
* @throws IOException
517-
* @throws InterruptedException
518-
* @throws NodeExistsException
519-
* @throws KeeperException
515+
* Verifies HBASE-5806. Here the case is that splitting is completed but before the CJ could
516+
* remove the parent region the master is killed and restarted.
520517
*/
521518
@Test
522519
public void testMasterRestartAtRegionSplitPendingCatalogJanitor()
523520
throws IOException, InterruptedException, NodeExistsException,
524-
KeeperException, ServiceException {
521+
KeeperException, ServiceException, ExecutionException {
525522
final TableName tableName = TableName.valueOf(name.getMethodName());
526523

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

548545
// Before cleanup, get a new master.

0 commit comments

Comments
 (0)