Skip to content

Commit

Permalink
if harness.host is not specified, use localhost instead of InetAddres…
Browse files Browse the repository at this point in the history
…s.getLocalHost().getHostAddress())

Signed-off-by: Scott Marlow <[email protected]>
  • Loading branch information
scottmarlow committed Aug 30, 2024
1 parent a46288d commit ff54782
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
12 changes: 4 additions & 8 deletions common/src/main/java/com/sun/ts/lib/harness/EETest.java
Original file line number Diff line number Diff line change
Expand Up @@ -485,14 +485,10 @@ protected Status getPropsReady(String[] argv, Properties p) {
}
// set the harness.host prop so the server can initialize the
// the TestUtil logging
try {
p.setProperty("harness.host",
InetAddress.getLocalHost().getHostAddress());
} catch (UnknownHostException e) {
TestUtil.logErr("Could not get our hostname to send to the "
+ "server for testcase: " + sTestCase);
return Status.failed("Could not get our hostname to send to the "
+ "server for testcase: " + sTestCase);

if(p.getProperty("harness.host") == null ) {
p.setProperty("harness.host", "localhost");
// InetAddress.getLocalHost().getHostAddress());
}
return run(argv, p);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public Properties getTestSpecificProperties(String[] sPropKeys)
}
// set all props that all tests need
pTestProps.put("harness.log.port", getProperty("harness.log.port"));
pTestProps.put("harness.host", getProperty("harness.host"));
pTestProps.put("harness.log.traceflag",
getProperty("harness.log.traceflag"));
pTestProps.put("harness.log.delayseconds",
Expand Down

0 comments on commit ff54782

Please sign in to comment.