@@ -342,7 +342,7 @@ public void testAdminServerRestartVersion() throws Exception {
342
342
Charset charset = StandardCharsets .UTF_8 ;
343
343
Files .write (path , modYaml .getBytes (charset ));
344
344
345
- // Apply the new yaml to update the domain crd
345
+ // Apply the new yaml to update the domain
346
346
logger .log (Level .INFO , "kubectl apply -f {0}" , path .toString ());
347
347
ExecResult exec = TestUtils .exec ("kubectl apply -f " + path .toString ());
348
348
logger .info (exec .stdout ());
@@ -362,11 +362,13 @@ public void testAdminServerRestartVersion() throws Exception {
362
362
logger .log (Level .INFO , "SUCCESS - {0}" , testMethodName );
363
363
}
364
364
365
- // @Test
365
+ @ Test
366
366
public void testClusterRestartVersion () throws Exception {
367
367
Assume .assumeFalse (QUICKTEST );
368
368
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
369
369
logTestBegin (testMethodName );
370
+ String podName = domainUid + "-managed-server1" ;
371
+
370
372
try {
371
373
// Modify the original domain yaml to include restartVersion in admin server node
372
374
DomainCRD crd = new DomainCRD (originalYaml );
@@ -387,22 +389,26 @@ public void testClusterRestartVersion() throws Exception {
387
389
ExecResult exec = TestUtils .exec ("kubectl apply -f " + path .toString ());
388
390
logger .info (exec .stdout ());
389
391
logger .info ("Verifying if the cluster is restarted" );
390
- // Pending
392
+ verifyPodStatus (podName , "Terminating" );
393
+ verifyPodStatus (podName , "Running" );
391
394
} finally {
392
395
logger .log (
393
396
Level .INFO , "Reverting back the domain to old crd\n kubectl apply -f {0}" , originalYaml );
394
397
TestUtils .exec ("kubectl apply -f " + originalYaml );
395
398
logger .info ("Verifying if the cluster is restarted" );
396
- // Pending
399
+ verifyPodStatus (podName , "Terminating" );
400
+ verifyPodStatus (podName , "Running" );
397
401
}
398
402
logger .log (Level .INFO , "SUCCESS - {0}" , testMethodName );
399
403
}
400
404
401
- // @Test
405
+ @ Test
402
406
public void testMSRestartVersion () throws Exception {
403
407
Assume .assumeFalse (QUICKTEST );
404
408
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
405
409
logTestBegin (testMethodName );
410
+ String podName = domainUid + "-managed-server1" ;
411
+
406
412
try {
407
413
// Modify the original domain yaml to include restartVersion in admin server node
408
414
DomainCRD crd = new DomainCRD (originalYaml );
@@ -425,22 +431,27 @@ public void testMSRestartVersion() throws Exception {
425
431
ExecResult exec = TestUtils .exec ("kubectl apply -f " + path .toString ());
426
432
logger .info (exec .stdout ());
427
433
logger .info ("Verifying if the managed server is restarted" );
428
- // Pending
434
+ verifyPodStatus (podName , "Terminating" );
435
+ verifyPodStatus (podName , "Running" );
429
436
} finally {
430
437
logger .log (
431
438
Level .INFO , "Reverting back the domain to old crd\n kubectl apply -f {0}" , originalYaml );
432
439
TestUtils .exec ("kubectl apply -f " + originalYaml );
433
440
logger .info ("Verifying if the managed server is restarted" );
434
- // Pending
441
+ verifyPodStatus (podName , "Terminating" );
442
+ verifyPodStatus (podName , "Running" );
435
443
}
436
444
logger .log (Level .INFO , "SUCCESS - {0}" , testMethodName );
437
445
}
438
446
439
- // @Test
447
+ @ Test
440
448
public void testDomainRestartVersion () throws Exception {
441
449
Assume .assumeFalse (QUICKTEST );
442
450
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
443
451
logTestBegin (testMethodName );
452
+ String adminPod = domainUid + "-" + domain .getAdminServerName ();
453
+ String msPod = domainUid + "-managed-server1" ;
454
+
444
455
try {
445
456
// Modify the original domain yaml to include restartVersion in admin server node
446
457
DomainCRD crd = new DomainCRD (originalYaml );
@@ -461,13 +472,23 @@ public void testDomainRestartVersion() throws Exception {
461
472
ExecResult exec = TestUtils .exec ("kubectl apply -f " + path .toString ());
462
473
logger .info (exec .stdout ());
463
474
logger .info ("Verifying if the domain is restarted" );
464
- // Pending
475
+ logger .info ("Verifying if the admin server is restarted" );
476
+ verifyPodStatus (adminPod , "Terminating" );
477
+ verifyPodStatus (adminPod , "Running" );
478
+ logger .info ("Verifying if the managed server is restarted" );
479
+ verifyPodStatus (msPod , "Terminating" );
480
+ verifyPodStatus (msPod , "Running" );
465
481
} finally {
466
482
logger .log (
467
483
Level .INFO , "Reverting back the domain to old crd\n kubectl apply -f {0}" , originalYaml );
468
484
TestUtils .exec ("kubectl apply -f " + originalYaml );
469
485
logger .info ("Verifying if the domain is restarted" );
470
- // Pending
486
+ logger .info ("Verifying if the admin server is restarted" );
487
+ verifyPodStatus (adminPod , "Terminating" );
488
+ verifyPodStatus (adminPod , "Running" );
489
+ logger .info ("Verifying if the managed server is restarted" );
490
+ verifyPodStatus (msPod , "Terminating" );
491
+ verifyPodStatus (msPod , "Running" );
471
492
}
472
493
logger .log (Level .INFO , "SUCCESS - {0}" , testMethodName );
473
494
}
0 commit comments