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.
22// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
44package oracle .weblogic .kubernetes ;
@@ -184,7 +184,12 @@ void testSessionMigrationIstioEnabled() {
184184 String primaryServerName = httpDataInfo .get (primaryServerAttr );
185185 String sessionCreateTime = httpDataInfo .get (sessionCreateTimeAttr );
186186 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+ }
188193 logger .info ("After patching the domain, the primary server changes to {0} "
189194 + ", session create time {1} and session state {2}" ,
190195 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.
22// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
44package oracle .weblogic .kubernetes ;
@@ -197,7 +197,12 @@ void testSessionMigration() {
197197 String primaryServerName = httpDataInfo .get (primaryServerAttr );
198198 String sessionCreateTime = httpDataInfo .get (sessionCreateTimeAttr );
199199 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+ }
201206 logger .info ("After patching the domain, the primary server changes to {0} "
202207 + ", session create time {1} and session state {2}" ,
203208 primaryServerName , sessionCreateTime , countStr );
You can’t perform that action at this time.
0 commit comments