diff --git a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/DeployWithLargeJarTest.java b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/DeployWithLargeJarTest.java index 2cf835dd0e0f..d121950e8bf2 100644 --- a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/DeployWithLargeJarTest.java +++ b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/DeployWithLargeJarTest.java @@ -37,7 +37,7 @@ public void deployLargeSetOfJars() throws Exception { String commonLibs = Arrays.stream(libDir.listFiles(x -> x.getName().startsWith("commons"))) .map(File::getAbsolutePath).collect(Collectors.joining(",")); GfshExecution execution = GfshScript.of("start locator --name=locator --max-heap=128m", - "start server --name=server --max-heap=128m", "sleep --time=1", + "start server --name=server --max-heap=128m --server-port=0", "sleep --time=1", "deploy --jars=" + commonLibs).execute(gfsh); } diff --git a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/DestroyIndexIfExistsTest.java b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/DestroyIndexIfExistsTest.java index 12e47af2d7c4..d0aadf3e1d2e 100644 --- a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/DestroyIndexIfExistsTest.java +++ b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/DestroyIndexIfExistsTest.java @@ -33,7 +33,7 @@ public class DestroyIndexIfExistsTest { @Test public void destroyIndexIfExists() throws Exception { GfshExecution execution = - GfshScript.of("start locator --name=locator", "start server --name=server", + GfshScript.of("start locator --name=locator", "start server --name=server --server-port=0", "sleep --time=1", "destroy index --name=i1 --if-exists=true").execute(gfsh); assertThat(execution.getOutputText()).contains("IGNORED", "Index named \"i1\" not found"); diff --git a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/ImportClusterConfigTest.java b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/ImportClusterConfigTest.java index b4e55bc22ad7..dcc24b34518d 100644 --- a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/ImportClusterConfigTest.java +++ b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/ImportClusterConfigTest.java @@ -37,7 +37,8 @@ public class ImportClusterConfigTest extends ClusterConfigTestBase { @Test public void importWouldNotShutDownServer() { GfshExecution startCluster = GfshScript - .of("start locator --name=" + locatorName, "start server --name=" + serverNotShutDownName) + .of("start locator --name=" + locatorName, + "start server --name=" + serverNotShutDownName + " --server-port=0") .withName("startCluster").execute(gfsh); assertThat(startCluster.getOutputText()).contains(locatorName + " is currently online") .contains(serverNotShutDownName + " is currently online"); diff --git a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StopServerAcceptanceTest.java b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StopServerAcceptanceTest.java index 3ccf59d9d218..c7568b15f2ff 100644 --- a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StopServerAcceptanceTest.java +++ b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StopServerAcceptanceTest.java @@ -29,7 +29,7 @@ public class StopServerAcceptanceTest { @Before public void startCluster() { - gfshRule.execute("start locator --name=locator", "start server --name=server"); + gfshRule.execute("start locator --name=locator", "start server --name=server --server-port=0"); } @Test diff --git a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StopServerWithSecurityAcceptanceTest.java b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StopServerWithSecurityAcceptanceTest.java index b58e1f2908e4..99a2c0037e59 100644 --- a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StopServerWithSecurityAcceptanceTest.java +++ b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StopServerWithSecurityAcceptanceTest.java @@ -105,6 +105,7 @@ private GfshExecution startCluster() { .addOption("security-properties-file", securityPropertiesFile.getAbsolutePath()).toString(); String startServer = new CommandStringBuilder("start server").addOption("name", "server") + .addOption("server-port", "0") .addOption("security-properties-file", securityPropertiesFile.getAbsolutePath()).toString(); return GfshScript.of(startLocator, startServer).withName("cluster-setup").execute(gfshRule); diff --git a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/shell/StatusServerExitCodeAcceptanceTest.java b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/shell/StatusServerExitCodeAcceptanceTest.java index f5550a4e1788..40394a34f262 100755 --- a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/shell/StatusServerExitCodeAcceptanceTest.java +++ b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/shell/StatusServerExitCodeAcceptanceTest.java @@ -145,7 +145,9 @@ private static String startLocatorCommand() { } private static String startServerCommand() { - return new CommandStringBuilder("start server").addOption("name", serverName).toString(); + return new CommandStringBuilder("start server") + .addOption("server-port", "0") + .addOption("name", serverName).toString(); } private String statusServerCommandByName() {