@@ -291,7 +291,7 @@ void testCustomLivenessProbeFailureThresholdSuccessThreshold() {
291
291
// patch the domain with custom failureThreshold
292
292
String patchStr
293
293
= "[{\" op\" : \" replace\" , \" path\" : \" /spec/serverPod/livenessProbe/failureThreshold\" , \" value\" : 3},"
294
- + "{\" op\" : \" add\" , \" path\" : \" /spec/serverPod/livenessProbe/periodSeconds\" , \" value\" : 20 }]" ;
294
+ + "{\" op\" : \" add\" , \" path\" : \" /spec/serverPod/livenessProbe/periodSeconds\" , \" value\" : 30 }]" ;
295
295
logger .info ("Updating domain configuration using patch string: {0}" , patchStr );
296
296
assertTrue (patchDomainCustomResource (domainUid , domainNamespace , new V1Patch (patchStr ), PATCH_FORMAT_JSON_PATCH ),
297
297
String .format ("failed to patch domain %s in namespace %s" , domainUid , domainNamespace ));
@@ -351,10 +351,10 @@ void testCustomLivenessProbeFailureThresholdSuccessThreshold() {
351
351
tempFile , managedServerPodName , domainNamespace ));
352
352
logger .info ("File copied to Pod {0} in namespace {1}" , managedServerPodName , domainNamespace );
353
353
354
- // check the pod should be restarted after 40s since the livenessProbe periodSeconds is changed to 20s .
355
- // sleep for 30s
354
+ // check the pod should be restarted after 1m since the livenessProbe periodSeconds is changed to 30s .
355
+ // sleep for 45s
356
356
try {
357
- Thread .sleep (30000 );
357
+ Thread .sleep (45000 );
358
358
} catch (InterruptedException ie ) {
359
359
// ignore
360
360
}
@@ -363,8 +363,8 @@ void testCustomLivenessProbeFailureThresholdSuccessThreshold() {
363
363
managedServerPodName , null ),
364
364
String .format ("Failed to get the restart count of the container from pod {0} in namespace {1} after 1m" ,
365
365
managedServerPodName , domainNamespace ));
366
- logger .info ("checking after 1m the restartCount is not changed." );
367
- assertTrue (beforeRestartCount == after1mRestartCount , "The pod was restarted after 1m , "
366
+ logger .info ("checking after 45s the restartCount is not changed." );
367
+ assertTrue (beforeRestartCount == after1mRestartCount , "The pod was restarted after 45s , "
368
368
+ "it should restart after that" );
369
369
370
370
String expectedStr = "Hello World, you have reached server "
@@ -419,7 +419,9 @@ void testCustomLivenessProbeFailureThresholdSuccessThreshold() {
419
419
420
420
patchStr
421
421
= "[{\" op\" : \" replace\" , \" path\" : \" /spec/serverPod/livenessProbe/failureThreshold\" , \" value\" : 1}, "
422
- + "{\" op\" : \" replace\" , \" path\" : \" /spec/serverPod/livenessProbe/successThreshold\" , \" value\" : 1}]" ;
422
+ + "{\" op\" : \" replace\" , \" path\" : \" /spec/serverPod/livenessProbe/successThreshold\" , \" value\" : 1}, "
423
+ + "{\" op\" : \" replace\" , \" path\" : \" /spec/serverPod/livenessProbe/periodSeconds\" , \" value\" : 45}]" ;
424
+
423
425
logger .info ("Updating domain configuration using patch string: {0}" , patchStr );
424
426
assertTrue (patchDomainCustomResource (domainUid , domainNamespace , new V1Patch (patchStr ), PATCH_FORMAT_JSON_PATCH ),
425
427
String .format ("failed to patch domain %s in namespace %s" , domainUid , domainNamespace ));
0 commit comments