Skip to content

Commit d73d205

Browse files
committed
address Anil's comments
1 parent 0e944bb commit d73d205

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public static void initAll(@Namespaces(2) List<String> namespaces) {
127127
// create a basic model in image domain
128128
createAndVerifyMiiDomain(imageName);
129129

130-
// create temp file
130+
// create temp file to be copied to managed server pod which will be used in customLivenessProbe.sh
131131
String fileName = "tempFile";
132132
tempFile = assertDoesNotThrow(() -> createTempfile(fileName), "Failed to create temp file");
133133
logger.info("File created {0}", tempFile);
@@ -323,11 +323,6 @@ void testCustomLivenessProbeFailureThresholdSuccessThreshold() {
323323
logger.info("livenessProbe failureThreshold after patch is: {0}", failureThreshold);
324324
assertTrue(failureThreshold.intValue() == 3, "The livenessProbe failureThreshold after patch is not 3");
325325

326-
// get the successThreshold of livenessProbe after patch
327-
successThreshold = domain1.getSpec().getServerPod().getLivenessProbe().getSuccessThreshold();
328-
logger.info("livenessProbe successThreshold after patch is: {0}", successThreshold);
329-
assertTrue(successThreshold.intValue() == 1, "The livenessProbe successThreshold after patch is not 1");
330-
331326
// verify the failureThreshold behavior of livenessProbe
332327
// copy temp file to pod and verify the restartCount only happens after 1m 30 second
333328
for (int i = 1; i <= NUMBER_OF_CLUSTERS_MIIDOMAIN; i++) {
@@ -358,13 +353,13 @@ void testCustomLivenessProbeFailureThresholdSuccessThreshold() {
358353
} catch (InterruptedException ie) {
359354
// ignore
360355
}
361-
int after1mRestartCount =
356+
int afterDeplayRestartCount =
362357
assertDoesNotThrow(() -> getContainerRestartCount(domainNamespace, null,
363358
managedServerPodName, null),
364359
String.format("Failed to get the restart count of the container from pod {0} in namespace {1} after 1m",
365360
managedServerPodName, domainNamespace));
366361
logger.info("checking after 45s the restartCount is not changed.");
367-
assertTrue(beforeRestartCount == after1mRestartCount, "The pod was restarted after 45s, "
362+
assertTrue(beforeRestartCount == afterDeplayRestartCount, "The pod was restarted after 45s, "
368363
+ "it should restart after that");
369364

370365
String expectedStr = "Hello World, you have reached server "

0 commit comments

Comments
 (0)