1
- // Copyright (c) 2022, Oracle and/or its affiliates.
1
+ // Copyright (c) 2022, 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 ;
62
62
import static oracle .weblogic .kubernetes .utils .CommonMiiTestUtils .createDomainResource ;
63
63
import static oracle .weblogic .kubernetes .utils .CommonTestUtils .checkPodReadyAndServiceExists ;
64
64
import static oracle .weblogic .kubernetes .utils .CommonTestUtils .testUntil ;
65
+ import static oracle .weblogic .kubernetes .utils .CommonTestUtils .withLongRetryPolicy ;
65
66
import static oracle .weblogic .kubernetes .utils .CommonTestUtils .withStandardRetryPolicy ;
66
67
import static oracle .weblogic .kubernetes .utils .DomainUtils .createDomainAndVerify ;
67
68
import static oracle .weblogic .kubernetes .utils .FileUtils .replaceStringInFile ;
@@ -277,7 +278,7 @@ void testHPAWithCustomMetrics() {
277
278
false , ingressClassName , false , 0 );
278
279
// create hpa with custom metrics
279
280
createHPA ();
280
- //invoke app 20 times to generate metrics with number of opened sessions > 15
281
+ //invoke app 20 times to generate metrics with number of opened sessions > 5
281
282
String curlCmd =
282
283
String .format ("curl --silent --show-error --noproxy '*' -H 'host: %s' http://%s:%s@%s:%s/" + SESSMIGT_APP_URL ,
283
284
ingressHostList .get (0 ),
@@ -295,13 +296,13 @@ void testHPAWithCustomMetrics() {
295
296
assertDoesNotThrow (() -> deletePod (managedServerPrefix + 1 , domainNamespace ));
296
297
assertDoesNotThrow (() -> deletePod (managedServerPrefix + 2 , domainNamespace ));
297
298
// wait until reboot
298
- for (int i = 1 ; i < 4 ; i ++) {
299
+ for (int i = 1 ; i < 3 ; i ++) {
299
300
checkPodReadyAndServiceExists (managedServerPrefix + i , domainUid , domainNamespace );
300
301
}
301
302
//wait for new metric to fetch
302
303
testUntil (
303
- withStandardRetryPolicy ,
304
- () -> verifyHPA (domainNamespace , "0/15 " ),
304
+ withLongRetryPolicy ,
305
+ () -> verifyHPA (domainNamespace , "0/5 " ),
305
306
logger ,
306
307
"Checking if total_open_session metric is 0" );
307
308
0 commit comments