Skip to content

Commit 2511618

Browse files
committed
Fix internal-grid-test(s) which are failing after -host change
1 parent fbca603 commit 2511618

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

java/server/test/org/openqa/grid/e2e/misc/GridViaCommandLineTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,13 @@ public void cannotStartHtmlSuite() {
225225
@Test
226226
public void testRegisterNodeToHub() throws Exception {
227227
Integer hubPort = PortProber.findFreePort();
228-
String[] hubArgs = {"-role", "hub", "-port", hubPort.toString()};
228+
String[] hubArgs = {"-role", "hub", "-host", "localhost", "-port", hubPort.toString()};
229229

230230
server = new GridLauncherV3(hubArgs).launch();
231231
waitUntilServerIsAvailableOnPort(hubPort);
232232

233233
Integer nodePort = PortProber.findFreePort();
234-
String[] nodeArgs = {"-role", "node", "-hub", "http://localhost:" + hubPort,
234+
String[] nodeArgs = {"-role", "node", "-host", "localhost", "-hub", "http://localhost:" + hubPort,
235235
"-browser", "browserName=htmlunit,maxInstances=1", "-port", nodePort.toString()};
236236
node = new GridLauncherV3(nodeArgs).launch();
237237
waitUntilServerIsAvailableOnPort(nodePort);
@@ -261,7 +261,7 @@ public void canStartHubUsingConfigFile() throws Exception {
261261
+ " \"timeout\": 3600\n"
262262
+ "}", hubPort);
263263
Files.write(hubConfig, hubJson.getBytes());
264-
String[] hubArgs = {"-role", "hub", "-hubConfig", hubConfig.toString()};
264+
String[] hubArgs = {"-role", "hub", "-host", "localhost", "-hubConfig", hubConfig.toString()};
265265
server = new GridLauncherV3(hubArgs).launch();
266266
waitUntilServerIsAvailableOnPort(hubPort);
267267

@@ -272,7 +272,7 @@ public void canStartHubUsingConfigFile() throws Exception {
272272
assertEquals(3600, realHubConfig.timeout.intValue());
273273

274274
Integer nodePort = PortProber.findFreePort();
275-
String[] nodeArgs = {"-role", "node", "-hub", "http://localhost:" + hubPort,
275+
String[] nodeArgs = {"-role", "node", "-host", "localhost", "-hub", "http://localhost:" + hubPort,
276276
"-browser", "browserName=htmlunit,maxInstances=1", "-port", nodePort.toString()};
277277
node = new GridLauncherV3(nodeArgs).launch();
278278
waitUntilServerIsAvailableOnPort(nodePort);
@@ -284,7 +284,7 @@ public void canStartHubUsingConfigFile() throws Exception {
284284
@Test
285285
public void canStartNodeUsingConfigFile() throws Exception {
286286
Integer hubPort = PortProber.findFreePort();
287-
String[] hubArgs = {"-role", "hub", "-port", hubPort.toString()};
287+
String[] hubArgs = {"-role", "hub", "-host", "localhost", "-port", hubPort.toString()};
288288
server = new GridLauncherV3(hubArgs).launch();
289289
waitUntilServerIsAvailableOnPort(hubPort);
290290

@@ -310,7 +310,7 @@ public void canStartNodeUsingConfigFile() throws Exception {
310310
+ " \"custom\": {}\n"
311311
+ "}", nodePort, hubPort);
312312
Files.write(nodeConfig, nodeJson.getBytes());
313-
String[] nodeArgs = {"-role", "node", "-nodeConfig", nodeConfig.toString() };
313+
String[] nodeArgs = {"-role", "node", "-host", "localhost", "-nodeConfig", nodeConfig.toString() };
314314
node = new GridLauncherV3(nodeArgs).launch();
315315
waitUntilServerIsAvailableOnPort(nodePort);
316316

0 commit comments

Comments
 (0)