From c677c30020778efd4134729c31c294bcd718e5f5 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Wed, 21 Feb 2018 15:26:21 -0800 Subject: [PATCH] HBASE-20042 TestRegionServerAbort flakey; ADDENDUM, RETRY --- .../regionserver/TestRegionServerAbort.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java index 0c778fb55db..d5cbad01c45 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerAbort.java @@ -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 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 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());