Skip to content

Commit 4f6aab2

Browse files
committed
Merge branch 'fix-session-term' into 'release/4.2'
Fix for secure domain upgrade nightly failures See merge request weblogic-cloud/weblogic-kubernetes-operator!4855
2 parents edf50fd + 9b14872 commit 4f6aab2

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class ItMiiDomainUpgradeToSecureMode {
135135
private final String imageTag12214 = "12.2.1.4";
136136
private final String imageTag1412 = "14.1.2.0.0-jdk17";
137137
private final String image1412 = BASE_IMAGES_PREFIX + WEBLOGIC_IMAGE_NAME_DEFAULT + ":" + imageTag1412;
138-
private final String sampleAppUri = "/sample-war/index.jsp";
138+
private final String sampleAppUri = "/sample-war/index.jsp?terminateSession=true";
139139
private final String adminAppUri = "/management/tenant-monitoring/servers";
140140
private final String adminAppText = "RUNNING";
141141
private final String adminAppMoved = "This document you requested has moved";
@@ -1020,7 +1020,7 @@ void testUpgrade12214to1412ServerStartModeProd() throws UnknownHostException {
10201020
"running in production mode");
10211021

10221022
//create ingress resources to route traffic to various service endpoints
1023-
createNginxIngressHostRouting(domainUid, 7001, 7002, 7100, nginxParams.getIngressClassName(), false);
1023+
createNginxIngressHostRouting(domainUid, 7001, 7002, 11000, nginxParams.getIngressClassName(), false);
10241024

10251025
//verify the number of channels available in the domain resource match with the count and name
10261026
verifyChannel(domainNamespace, domainUid, List.of(channelName));

integration-tests/src/test/resources/apps/sample-app/sample-war/index.jsp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,16 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
44
--%>
55
<%
66
out.println("Hello World, you have reached server " + System.getProperty("weblogic.Name" ));
7+
// Check if the "terminateSession" parameter is set to "true"
8+
String terminateSession = request.getParameter("terminateSession");
9+
if ("true".equalsIgnoreCase(terminateSession) && session != null) {
10+
// Print session info
11+
out.println("Session ID: " + session.getId() + "<br/>");
12+
out.println("Creation Time: " + new java.util.Date(session.getCreationTime()) + "<br/>");
13+
out.println("Last Accessed Time: " + new java.util.Date(session.getLastAccessedTime()) + "<br/>");
14+
session.invalidate();
15+
out.println("Session has been terminated.");
16+
} else {
17+
out.println("No active session.");
18+
}
719
%>

integration-tests/src/test/resources/securemodeupgrade/upgrade-startmode-prod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ topology:
1111
ServerTemplate:
1212
myserver-template:
1313
Cluster: mycluster
14-
ListenPort: 7100
14+
ListenPort: 11000
1515
Cluster:
1616
mycluster:
1717
DynamicServers:

0 commit comments

Comments
 (0)