Skip to content

Commit 1969670

Browse files
committed
fixing errors
1 parent 36da76c commit 1969670

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,22 +138,23 @@ public void verifyPodsCreated() throws Exception {
138138
}
139139

140140
/**
141-
*
141+
* verify services are created
142+
*
142143
* @throws Exception
143144
*/
144145
public void verifyServicesCreated() throws Exception {
145-
verifyServicesCreated(false);
146+
verifyServicesCreated(false);
146147
}
147-
148+
148149
/**
149150
* verify services are created
150151
*
151-
* @param precreateService - if true check services are created for configuredManagedServerCount number of servers else
152-
* check for initialManagedServerReplicas number of servers
152+
* @param precreateService - if true check services are created for configuredManagedServerCount
153+
* number of servers else check for initialManagedServerReplicas number of servers
153154
* @throws Exception
154-
*/
155+
*/
155156
public void verifyServicesCreated(boolean precreateService) throws Exception {
156-
// check admin service
157+
// check admin service
157158
logger.info("Checking if admin service(" + domainUid + "-" + adminServerName + ") is created");
158159
TestUtils.checkServiceCreated(domainUid + "-" + adminServerName, domainNS);
159160

@@ -169,7 +170,9 @@ public void verifyServicesCreated(boolean precreateService) throws Exception {
169170

170171
if (!serverStartPolicy.equals("ADMIN_ONLY")) {
171172
// check managed server services
172-
for (int i = 1; i <= (precreateService? configuredManagedServerCount: initialManagedServerReplicas); i++) {
173+
for (int i = 1;
174+
i <= (precreateService ? configuredManagedServerCount : initialManagedServerReplicas);
175+
i++) {
173176
logger.info(
174177
"Checking if managed service("
175178
+ domainUid
@@ -635,18 +638,18 @@ public void restartUsingServerStartPolicy() throws Exception {
635638
verifyPodsCreated();
636639
verifyServersReady();
637640
}
638-
641+
639642
/**
640643
* add precreateService true in domain.yaml
641644
*
642645
* @throws Exception
643646
*/
644647
public void enablePrecreateService() throws Exception {
645-
String patchStr = "'{\"spec\":{\"serverService\":{\"precreateService\":true}}'";
648+
String patchStr = "'{\"spec\":{\"serverService\":{\"precreateService\":true}}}'";
646649
TestUtils.kubectlpatch(domainUid, domainNS, patchStr);
647650
verifyServicesCreated(true);
648651
}
649-
652+
650653
/**
651654
* verify domain is deleted
652655
*
@@ -1798,7 +1801,8 @@ public int getLoadBalancerWebPort() {
17981801
*/
17991802
public void shutdownManagedServerUsingServerStartPolicy(String msName) throws Exception {
18001803
logger.info("About to shutdown managed server <" + msName + ">");
1801-
String patchStr = "'{\"spec\":{\"managedServers\":[{\"serverName\":\""
1804+
String patchStr =
1805+
"'{\"spec\":{\"managedServers\":[{\"serverName\":\""
18021806
+ msName
18031807
+ "\",\"serverStartPolicy\":\"NEVER\"}]}}' ";
18041808
TestUtils.kubectlpatch(domainUid, domainNS, patchStr);
@@ -1813,11 +1817,12 @@ public void shutdownManagedServerUsingServerStartPolicy(String msName) throws Ex
18131817
*/
18141818
public void restartManagedServerUsingServerStartPolicy(String msName) throws Exception {
18151819
logger.info("About to restart managed server <" + msName + "> ");
1816-
String patchStr = "'{\"spec\":{\"managedServers\":[{\"serverName\":\""
1820+
String patchStr =
1821+
"'{\"spec\":{\"managedServers\":[{\"serverName\":\""
18171822
+ msName
18181823
+ "\",\"serverStartPolicy\":\"IF_NEEDED\"}]}}'";
18191824
TestUtils.kubectlpatch(domainUid, domainNS, patchStr);
1820-
1825+
18211826
TestUtils.checkPodCreated(domainUid + "-" + msName, domainNS);
18221827
TestUtils.checkPodReady(domainUid + "-" + msName, domainNS);
18231828
}

integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,8 @@ public static ExecResult loginAndPushImageToOCIR(String image) throws Exception
14101410
return result;
14111411
}
14121412

1413-
public static ExecResult kubectlpatch(String domainUid, String domainNS, String patchStr) {
1413+
public static ExecResult kubectlpatch(String domainUid, String domainNS, String patchStr)
1414+
throws Exception {
14141415
String cmd =
14151416
"kubectl patch domain "
14161417
+ domainUid

0 commit comments

Comments
 (0)