Skip to content

Commit 051bc00

Browse files
committed
Merge branch 'xc-111152' into 'release/3.4'
backport - [wko-nightly] NumberFormatException in ItIstioSessionMigration to release/3.4 See merge request weblogic-cloud/weblogic-kubernetes-operator!4367
2 parents 150de80 + 2da8340 commit 051bc00

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

Jenkinsfile.kindnightly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pipeline {
105105
parameters {
106106
string(name: 'BRANCH',
107107
description: 'The branch to run the tests on',
108-
defaultValue: 'main'
108+
defaultValue: 'release/3.4'
109109
)
110110
choice(name: 'MAVEN_PROFILE_NAME',
111111
description: 'Profile to use in mvn command to run the tests. Possible values are kind-parallel (the default), kind-sequential and integration-tests. Refer to weblogic-kubernetes-operator/integration-tests/pom.xml on the branch.',

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022, Oracle and/or its affiliates.
1+
// Copyright (c) 2022, 2023, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package oracle.weblogic.kubernetes;
@@ -181,7 +181,12 @@ void testSessionMigrationIstioEnabled() {
181181
String primaryServerName = httpDataInfo.get(primaryServerAttr);
182182
String sessionCreateTime = httpDataInfo.get(sessionCreateTimeAttr);
183183
String countStr = httpDataInfo.get(countAttr);
184-
int count = Optional.ofNullable(countStr).map(Integer::valueOf).orElse(managedServerPort);
184+
int count;
185+
if (countStr.equalsIgnoreCase("null")) {
186+
count = managedServerPort;
187+
} else {
188+
count = Optional.ofNullable(countStr).map(Integer::valueOf).orElse(managedServerPort);
189+
}
185190
logger.info("After patching the domain, the primary server changes to {0} "
186191
+ ", session create time {1} and session state {2}",
187192
primaryServerName, sessionCreateTime, countStr);

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
1+
// Copyright (c) 2020, 2023, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package oracle.weblogic.kubernetes;
@@ -194,7 +194,12 @@ void testSessionMigration() {
194194
String primaryServerName = httpDataInfo.get(primaryServerAttr);
195195
String sessionCreateTime = httpDataInfo.get(sessionCreateTimeAttr);
196196
String countStr = httpDataInfo.get(countAttr);
197-
int count = Optional.ofNullable(countStr).map(Integer::valueOf).orElse(0);
197+
int count;
198+
if (countStr.equalsIgnoreCase("null")) {
199+
count = 0;
200+
} else {
201+
count = Optional.ofNullable(countStr).map(Integer::valueOf).orElse(0);
202+
}
198203
logger.info("After patching the domain, the primary server changes to {0} "
199204
+ ", session create time {1} and session state {2}",
200205
primaryServerName, sessionCreateTime, countStr);

0 commit comments

Comments
 (0)