Skip to content

Commit a4bd243

Browse files
committed
clean up some comments
1 parent b37d332 commit a4bd243

File tree

1 file changed

+2
-35
lines changed

1 file changed

+2
-35
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/ITPodsShutdown.java

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,10 @@ public static void staticPrepare() throws Exception {
7474
+ domain.getDomainUid()
7575
+ "/domain.yaml";
7676
Assert.assertNotNull(domain);
77-
// Build WAR in the admin pod and deploy it from the admin pod to a weblogic target
78-
// domain.buildDeployJavaAppInPod(
79-
// testAppName, scriptName, BaseTest.getUsername(), BaseTest.getPassword());
8077
domainUid = domain.getDomainUid();
8178
domainNS = domain.getDomainNS();
8279
BaseTest.setWaitTimePod(2);
8380
BaseTest.setMaxIterationsPod(100);
84-
// Wait some time for deployment gets ready
85-
// Thread.sleep(10 * 1000);
86-
// restart managed server to get default shutdown time with default shutdown options
87-
8881
}
8982
}
9083

@@ -311,7 +304,7 @@ public void testAddShutdownOptionsToMSForced() throws Exception {
311304
updateCRDYamlVerifyShutdown(crd, delayTime);
312305

313306
Assert.assertTrue(checkShutdownUpdatedProp(domainUid + "-managed-server1", "Forced"));
314-
if ((2 * terminationDefaultOptionsTime < terminationTime)) {
307+
if ((terminationDefaultOptionsTime < terminationTime)) {
315308
logger.info("\"FAILURE: ignored timeout Forced value during shutdown");
316309
throw new Exception("FAILURE: ignored timeoutValue during shutdown");
317310
}
@@ -404,7 +397,7 @@ public void testShutdownOptionsOverrideClusterLevel() throws Exception {
404397

405398
crd.addShutDownOptionToMS("managed-server1", shutdownProps);
406399
updateCRDYamlVerifyShutdown(crd, 0);
407-
// scale up to 2 replicase to check both managed servers in the cluster
400+
// scale up to 2 replicas to check both managed servers in the cluster
408401
scaleCluster(2);
409402
checkShutdownUpdatedProp(domainUid + "-managed-server1", "Graceful");
410403
checkShutdownUpdatedProp(domainUid + "-managed-server2", "Forced");
@@ -562,30 +555,6 @@ private void scaleCluster(int replicas) throws Exception {
562555
operator1.scale(domain.getDomainUid(), domain.getClusterName(), replicas);
563556
}
564557

565-
/**
566-
* Return time for pod to be deleted initiates a pod restart.
567-
*
568-
* @param podName
569-
* @throws Exception
570-
*/
571-
/*
572-
public static long checkShutdownTime(String podName) throws Exception {
573-
String namespace = domainNS;
574-
long startTime = System.currentTimeMillis();
575-
long maxWaitMillis = 280 * 1000;
576-
577-
// checking time up to next restart
578-
TestUtils.checkPodCreated(podName, namespace);
579-
long currentTime = System.currentTimeMillis();
580-
if ((currentTime - startTime) > maxWaitMillis) {
581-
throw new RuntimeException(
582-
"Pod " + podName + " not terminating within " + maxWaitMillis / 1000 + " seconds");
583-
}
584-
logger.info("The time to terminate the pod is " + (currentTime - startTime));
585-
return (currentTime - startTime);
586-
}
587-
*/
588-
589558
/**
590559
* shutdown managed server
591560
*
@@ -594,9 +563,7 @@ public static long checkShutdownTime(String podName) throws Exception {
594563
public static void shutdownServer(String serverName) throws Exception {
595564

596565
String cmd = "kubectl delete pod " + domainUid + "-" + serverName + " -n " + domainNS;
597-
598566
logger.info("command to shutdown server <" + serverName + "> is: " + cmd);
599-
600567
ExecResult result = ExecCommand.exec(cmd);
601568
if (result.exitValue() != 0) {
602569
throw new Exception("FAILURE: command " + cmd + " failed, returned " + result.stderr());

0 commit comments

Comments
 (0)