6
6
7
7
import java .util .ArrayList ;
8
8
import java .util .Map ;
9
- import oracle .kubernetes .operator .utils .Operator .RESTCertType ;
10
9
import oracle .kubernetes .operator .utils .Domain ;
11
10
import oracle .kubernetes .operator .utils .ExecCommand ;
12
11
import oracle .kubernetes .operator .utils .ExecResult ;
13
12
import oracle .kubernetes .operator .utils .Operator ;
13
+ import oracle .kubernetes .operator .utils .Operator .RESTCertType ;
14
14
import oracle .kubernetes .operator .utils .TestUtils ;
15
15
import org .junit .AfterClass ;
16
16
import org .junit .Assume ;
@@ -632,9 +632,10 @@ public void testAddRemoveDomainUpdateOperatorHC() throws Exception {
632
632
verifyOperatorDomainManagement (operator , domainnew , true );
633
633
testCompletedSuccessfully = true ;
634
634
} finally {
635
- if (domain != null ) TestUtils .deleteWeblogicDomainResources (domain .getDomainUid ());
636
- if (domainnew != null ) domainnew .destroy ();
637
-
635
+ if (domain != null )
636
+ TestUtils .deleteWeblogicDomainResources (domain .getDomainUid ());
637
+ if (domainnew != null )
638
+ domainnew .destroy ();
638
639
if (operator != null ) {
639
640
operator .destroy ();
640
641
}
@@ -669,22 +670,20 @@ public void testDeleteOperatorButNotDomain() throws Exception {
669
670
operator = null ;
670
671
domain .testWlsLivenessProbe ();
671
672
testCompletedSuccessfully = true ;
672
- } finally {
673
- if (domain != null ) TestUtils .deleteWeblogicDomainResources (domain .getDomainUid ());
674
-
675
- if (operator != null ) {
676
- operator .destroy ();
673
+ } finally {
674
+ if (domain != null )
675
+ TestUtils .deleteWeblogicDomainResources (domain .getDomainUid ());
676
+ if (operator != null ) {
677
+ operator .destroy ();
678
+ }
679
+ number ++;
677
680
}
678
- number ++;
679
- }
680
-
681
681
logger .info ("SUCCESS - " + testMethodName );
682
682
}
683
683
684
684
private void verifyOperatorDomainManagement (
685
685
Operator operator , Domain domain , boolean isAccessible ) throws Exception {
686
686
for (int i = 0 ; i < maxIterations ; i ++) {
687
-
688
687
try {
689
688
operator .verifyDomainExists (domain .getDomainUid ());
690
689
if (!isAccessible ) {
@@ -697,7 +696,6 @@ private void verifyOperatorDomainManagement(
697
696
if (!ex .getMessage ()
698
697
.contains (
699
698
"Response {\" status\" :404,\" detail\" :\" /operator/latest/domains/test" + number )) {
700
-
701
699
} else {
702
700
break ;
703
701
}
0 commit comments