diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java index 0137a83750f..cb508f6beaf 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java @@ -3717,6 +3717,7 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility { do { port = randomPort(); if (takenRandomPorts.contains(port)) { + port = 0; continue; } takenRandomPorts.add(port);