HBASE-20042 TestRegionServerAbort flakey; ADDENDUM, RETRY

This commit is contained in:
Michael Stack 2018-02-21 15:26:21 -08:00
parent 92bb4db9ef
commit c677c30020
1 changed files with 3 additions and 14 deletions

View File

@ -144,21 +144,10 @@ public class TestRegionServerAbort {
put.addColumn(FAMILY_BYTES, Bytes.toBytes("c"), new byte[]{});
put.setAttribute(StopBlockingRegionObserver.DO_ABORT, new byte[]{1});
table.put(put);
// should have triggered an abort due to FileNotFoundException
// verify that the regionserver is stopped
List<HRegion> regions = null;
do {
regions = cluster.findRegionsForTable(tableName);
if (regions != null && regions.size() > 0) {
break;
}
LOG.warn("Waiting on regions for {} to online");
Threads.sleep(100);
} while(true);
List<HRegion> regions = cluster.findRegionsForTable(tableName);
HRegion firstRegion = cluster.findRegionsForTable(tableName).get(0);
table.put(put);
// Verify that the regionserver is stopped
assertNotNull(firstRegion);
assertNotNull(firstRegion.getRegionServerServices());
LOG.info("isAborted = " + firstRegion.getRegionServerServices().isAborted());