diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java index b0fb0b7c58d..308529616b6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java @@ -194,11 +194,7 @@ public class TestFlushFromClient { } private List getRegionInfo() { - return TEST_UTIL.getHBaseCluster().getLiveRegionServerThreads().stream() - .map(JVMClusterUtil.RegionServerThread::getRegionServer) - .flatMap(r -> r.getRegions().stream()) - .filter(r -> r.getTableDescriptor().getTableName().equals(tableName)) - .collect(Collectors.toList()); + return TEST_UTIL.getHBaseCluster().getRegions(tableName); } private List getRegionInfo(HRegionServer rs) {