File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
integration-tests/src/test/java/oracle/weblogic/kubernetes Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1
- // Copyright (c) 2021, 2022 , Oracle and/or its affiliates.
1
+ // Copyright (c) 2021, 2023 , Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3
3
4
4
package oracle .weblogic .kubernetes ;
@@ -184,7 +184,12 @@ void testSessionMigrationIstioEnabled() {
184
184
String primaryServerName = httpDataInfo .get (primaryServerAttr );
185
185
String sessionCreateTime = httpDataInfo .get (sessionCreateTimeAttr );
186
186
String countStr = httpDataInfo .get (countAttr );
187
- int count = Optional .ofNullable (countStr ).map (Integer ::valueOf ).orElse (managedServerPort );
187
+ int count ;
188
+ if (countStr .equalsIgnoreCase ("null" )) {
189
+ count = managedServerPort ;
190
+ } else {
191
+ count = Optional .ofNullable (countStr ).map (Integer ::valueOf ).orElse (managedServerPort );
192
+ }
188
193
logger .info ("After patching the domain, the primary server changes to {0} "
189
194
+ ", session create time {1} and session state {2}" ,
190
195
primaryServerName , sessionCreateTime , countStr );
Original file line number Diff line number Diff line change 1
- // Copyright (c) 2020, 2022 , Oracle and/or its affiliates.
1
+ // Copyright (c) 2020, 2023 , Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3
3
4
4
package oracle .weblogic .kubernetes ;
@@ -197,7 +197,12 @@ void testSessionMigration() {
197
197
String primaryServerName = httpDataInfo .get (primaryServerAttr );
198
198
String sessionCreateTime = httpDataInfo .get (sessionCreateTimeAttr );
199
199
String countStr = httpDataInfo .get (countAttr );
200
- int count = Optional .ofNullable (countStr ).map (Integer ::valueOf ).orElse (0 );
200
+ int count ;
201
+ if (countStr .equalsIgnoreCase ("null" )) {
202
+ count = 0 ;
203
+ } else {
204
+ count = Optional .ofNullable (countStr ).map (Integer ::valueOf ).orElse (0 );
205
+ }
201
206
logger .info ("After patching the domain, the primary server changes to {0} "
202
207
+ ", session create time {1} and session state {2}" ,
203
208
primaryServerName , sessionCreateTime , countStr );
You can’t perform that action at this time.
0 commit comments