@@ -138,22 +138,23 @@ public void verifyPodsCreated() throws Exception {
138
138
}
139
139
140
140
/**
141
- *
141
+ * verify services are created
142
+ *
142
143
* @throws Exception
143
144
*/
144
145
public void verifyServicesCreated () throws Exception {
145
- verifyServicesCreated (false );
146
+ verifyServicesCreated (false );
146
147
}
147
-
148
+
148
149
/**
149
150
* verify services are created
150
151
*
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
153
154
* @throws Exception
154
- */
155
+ */
155
156
public void verifyServicesCreated (boolean precreateService ) throws Exception {
156
- // check admin service
157
+ // check admin service
157
158
logger .info ("Checking if admin service(" + domainUid + "-" + adminServerName + ") is created" );
158
159
TestUtils .checkServiceCreated (domainUid + "-" + adminServerName , domainNS );
159
160
@@ -169,7 +170,9 @@ public void verifyServicesCreated(boolean precreateService) throws Exception {
169
170
170
171
if (!serverStartPolicy .equals ("ADMIN_ONLY" )) {
171
172
// 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 ++) {
173
176
logger .info (
174
177
"Checking if managed service("
175
178
+ domainUid
@@ -635,18 +638,18 @@ public void restartUsingServerStartPolicy() throws Exception {
635
638
verifyPodsCreated ();
636
639
verifyServersReady ();
637
640
}
638
-
641
+
639
642
/**
640
643
* add precreateService true in domain.yaml
641
644
*
642
645
* @throws Exception
643
646
*/
644
647
public void enablePrecreateService () throws Exception {
645
- String patchStr = "'{\" spec\" :{\" serverService\" :{\" precreateService\" :true}}'" ;
648
+ String patchStr = "'{\" spec\" :{\" serverService\" :{\" precreateService\" :true}}} '" ;
646
649
TestUtils .kubectlpatch (domainUid , domainNS , patchStr );
647
650
verifyServicesCreated (true );
648
651
}
649
-
652
+
650
653
/**
651
654
* verify domain is deleted
652
655
*
@@ -1798,7 +1801,8 @@ public int getLoadBalancerWebPort() {
1798
1801
*/
1799
1802
public void shutdownManagedServerUsingServerStartPolicy (String msName ) throws Exception {
1800
1803
logger .info ("About to shutdown managed server <" + msName + ">" );
1801
- String patchStr = "'{\" spec\" :{\" managedServers\" :[{\" serverName\" :\" "
1804
+ String patchStr =
1805
+ "'{\" spec\" :{\" managedServers\" :[{\" serverName\" :\" "
1802
1806
+ msName
1803
1807
+ "\" ,\" serverStartPolicy\" :\" NEVER\" }]}}' " ;
1804
1808
TestUtils .kubectlpatch (domainUid , domainNS , patchStr );
@@ -1813,11 +1817,12 @@ public void shutdownManagedServerUsingServerStartPolicy(String msName) throws Ex
1813
1817
*/
1814
1818
public void restartManagedServerUsingServerStartPolicy (String msName ) throws Exception {
1815
1819
logger .info ("About to restart managed server <" + msName + "> " );
1816
- String patchStr = "'{\" spec\" :{\" managedServers\" :[{\" serverName\" :\" "
1820
+ String patchStr =
1821
+ "'{\" spec\" :{\" managedServers\" :[{\" serverName\" :\" "
1817
1822
+ msName
1818
1823
+ "\" ,\" serverStartPolicy\" :\" IF_NEEDED\" }]}}'" ;
1819
1824
TestUtils .kubectlpatch (domainUid , domainNS , patchStr );
1820
-
1825
+
1821
1826
TestUtils .checkPodCreated (domainUid + "-" + msName , domainNS );
1822
1827
TestUtils .checkPodReady (domainUid + "-" + msName , domainNS );
1823
1828
}
0 commit comments