Skip to content

Commit

Permalink
Fix OpenLiberty#2 for test failure in RTC 282932. Unconditionally res…
Browse files Browse the repository at this point in the history
…et the server in KdcHelper in test setup.
  • Loading branch information
Jesse Van Hill authored and emilytee committed Apr 27, 2021
1 parent 8d42f3e commit e851f8d
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,15 @@ public static void commonSetUp(String testServerName, String serverXml, List<Str
Log.info(c, thisMethod, "Using initial config: " + config);
}

if (getKdcHelper() == null) {
setKdcHelper(getKdcHelper(getMyServer()));
} else {
createKrbConf(getKdcHelper().server);
}

if (createSpnAndKeytab) {
try {
Log.info(c, thisMethod, "Creating SPN and keytab");
if (getKdcHelper() == null) {
setKdcHelper(getKdcHelper(getMyServer()));
} else {
createKrbConf(getKdcHelper().server);
}
getKdcHelper().createSpnAndKeytab(spnRealm, useCanonicalHostName, SPNEGOConstants.DEFAULT_CMD_ARGS);
} catch (Exception e) {
Log.info(c, thisMethod, "Got unexpected exception; no tests will be run: " + CommonTest.maskHostnameAndPassword(e.getMessage()));
Expand Down

0 comments on commit e851f8d

Please sign in to comment.