Skip to content

Commit fa716d3

Browse files
committed
cleanup
1 parent b5466ee commit fa716d3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ void testCustomLivenessProbeFailureThresholdSuccessThreshold() {
291291
// patch the domain with custom failureThreshold
292292
String patchStr
293293
= "[{\"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}]";
295295
logger.info("Updating domain configuration using patch string: {0}", patchStr);
296296
assertTrue(patchDomainCustomResource(domainUid, domainNamespace, new V1Patch(patchStr), PATCH_FORMAT_JSON_PATCH),
297297
String.format("failed to patch domain %s in namespace %s", domainUid, domainNamespace));
@@ -351,10 +351,10 @@ void testCustomLivenessProbeFailureThresholdSuccessThreshold() {
351351
tempFile, managedServerPodName, domainNamespace));
352352
logger.info("File copied to Pod {0} in namespace {1}", managedServerPodName, domainNamespace);
353353

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
356356
try {
357-
Thread.sleep(30000);
357+
Thread.sleep(45000);
358358
} catch (InterruptedException ie) {
359359
// ignore
360360
}
@@ -363,8 +363,8 @@ void testCustomLivenessProbeFailureThresholdSuccessThreshold() {
363363
managedServerPodName, null),
364364
String.format("Failed to get the restart count of the container from pod {0} in namespace {1} after 1m",
365365
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, "
368368
+ "it should restart after that");
369369

370370
String expectedStr = "Hello World, you have reached server "
@@ -419,7 +419,9 @@ void testCustomLivenessProbeFailureThresholdSuccessThreshold() {
419419

420420
patchStr
421421
= "[{\"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+
423425
logger.info("Updating domain configuration using patch string: {0}", patchStr);
424426
assertTrue(patchDomainCustomResource(domainUid, domainNamespace, new V1Patch(patchStr), PATCH_FORMAT_JSON_PATCH),
425427
String.format("failed to patch domain %s in namespace %s", domainUid, domainNamespace));

0 commit comments

Comments
 (0)