Skip to content

Commit e08a273

Browse files
authored
Add max wait time to session migration test (#2286)
1 parent 8b974e0 commit e08a273

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItSessionMigration.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,16 +450,18 @@ private static String buildCurlCommand(String curlUrlPath,
450450
logger.info("Build a curl command with pod name {0}, curl URL path {1} and HTTP header option {2}",
451451
clusterAddress, curlUrlPath, headerOption);
452452

453-
StringBuffer curlCmd = new StringBuffer("curl --silent --show-error http://");
454-
curlCmd.append(clusterAddress)
453+
int waittime = 5;
454+
return new StringBuilder()
455+
.append("curl --silent --show-error")
456+
.append(" --connect-timeout ").append(waittime).append(" --max-time ").append(waittime)
457+
.append(" http://")
458+
.append(clusterAddress)
455459
.append(":")
456460
.append(managedServerPort)
457461
.append("/")
458462
.append(curlUrlPath)
459463
.append(headerOption)
460-
.append(httpHeaderFile);
461-
462-
return curlCmd.toString();
464+
.append(httpHeaderFile).toString();
463465
}
464466

465467
private static Map<String, String> processHttpRequest(String serverName,

0 commit comments

Comments
 (0)