@@ -74,17 +74,10 @@ public static void staticPrepare() throws Exception {
74
74
+ domain .getDomainUid ()
75
75
+ "/domain.yaml" ;
76
76
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());
80
77
domainUid = domain .getDomainUid ();
81
78
domainNS = domain .getDomainNS ();
82
79
BaseTest .setWaitTimePod (2 );
83
80
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
-
88
81
}
89
82
}
90
83
@@ -311,7 +304,7 @@ public void testAddShutdownOptionsToMSForced() throws Exception {
311
304
updateCRDYamlVerifyShutdown (crd , delayTime );
312
305
313
306
Assert .assertTrue (checkShutdownUpdatedProp (domainUid + "-managed-server1" , "Forced" ));
314
- if ((2 * terminationDefaultOptionsTime < terminationTime )) {
307
+ if ((terminationDefaultOptionsTime < terminationTime )) {
315
308
logger .info ("\" FAILURE: ignored timeout Forced value during shutdown" );
316
309
throw new Exception ("FAILURE: ignored timeoutValue during shutdown" );
317
310
}
@@ -404,7 +397,7 @@ public void testShutdownOptionsOverrideClusterLevel() throws Exception {
404
397
405
398
crd .addShutDownOptionToMS ("managed-server1" , shutdownProps );
406
399
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
408
401
scaleCluster (2 );
409
402
checkShutdownUpdatedProp (domainUid + "-managed-server1" , "Graceful" );
410
403
checkShutdownUpdatedProp (domainUid + "-managed-server2" , "Forced" );
@@ -562,30 +555,6 @@ private void scaleCluster(int replicas) throws Exception {
562
555
operator1 .scale (domain .getDomainUid (), domain .getClusterName (), replicas );
563
556
}
564
557
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
-
589
558
/**
590
559
* shutdown managed server
591
560
*
@@ -594,9 +563,7 @@ public static long checkShutdownTime(String podName) throws Exception {
594
563
public static void shutdownServer (String serverName ) throws Exception {
595
564
596
565
String cmd = "kubectl delete pod " + domainUid + "-" + serverName + " -n " + domainNS ;
597
-
598
566
logger .info ("command to shutdown server <" + serverName + "> is: " + cmd );
599
-
600
567
ExecResult result = ExecCommand .exec (cmd );
601
568
if (result .exitValue () != 0 ) {
602
569
throw new Exception ("FAILURE: command " + cmd + " failed, returned " + result .stderr ());
0 commit comments