25
25
/**
26
26
* Simple JUnit test file used for testing Operator.
27
27
*
28
- * <p>This test is used for creating Operator(s) and multiple domains which are managed by the
29
- * Operator(s) .
28
+ * <p>This test is used for creating Operator(s) and domain(s) which are managed by the Operator(s).
29
+ * And to test WLS server discovery feature .
30
30
*/
31
31
@ FixMethodOrder (MethodSorters .NAME_ASCENDING )
32
32
public class ITServerDiscovery extends BaseTest {
@@ -38,10 +38,8 @@ public class ITServerDiscovery extends BaseTest {
38
38
/**
39
39
* This method gets called only once before any of the test methods are executed. It does the
40
40
* initialization of the integration test properties defined in OperatorIT.properties and setting
41
- * the resultRoot, pvRoot and projectRoot attributes.
42
- *
43
- * <p>It also create operator and verify its deployed successfully. Create domain and verify
44
- * domain is created.
41
+ * the resultRoot, pvRoot and projectRoot attributes. It also creates Operator, domain and a test
42
+ * domain yaml file.
45
43
*
46
44
* @throws Exception
47
45
*/
@@ -87,7 +85,7 @@ public static void staticPrepare() throws Exception {
87
85
}
88
86
89
87
/**
90
- * Releases k8s cluster lease, archives result, pv directories
88
+ * Releases k8s cluster lease, archives result, pv directories.
91
89
*
92
90
* @throws Exception
93
91
*/
@@ -103,8 +101,8 @@ public static void staticUnPrepare() throws Exception {
103
101
}
104
102
105
103
/**
106
- * Restart Operator and verify that it connects to a pre-configed and newly started managed server
107
- * by applying a modified domain.yaml
104
+ * Stop Operator. Start a managed server by applying a modified domain.yaml. Restart Operator and
105
+ * verify that it connects to this newly started managed server.
108
106
*
109
107
* @throws Exception
110
108
*/
@@ -136,10 +134,8 @@ public void testOPConnToNewMS() throws Exception {
136
134
}
137
135
138
136
/**
139
- * Restart Operator and verify that it discovers running servers and a newly started server by
140
- * scaling up cluster.
141
- *
142
- * <p>Verify that the cluster scale up is noy impacted
137
+ * Stop and restart Operator and verify that it discovers running servers and a newly started
138
+ * server by scaling up cluster. Verify that the cluster scale up is noy impacted.
143
139
*
144
140
* @throws Exception
145
141
*/
@@ -163,10 +159,8 @@ public void testOPReconnToRunningMSAndScaleUp() throws Exception {
163
159
}
164
160
165
161
/**
166
- * Restart both Operator and admin server and verify that it discovers running servers and a newly
167
- * started server by scaling up cluster.
168
- *
169
- * <p>Verify that the cluster scale up is noy impacted
162
+ * Stop Operator and admin server. Restart Operator. Verify that it restarts admin server and
163
+ * discovers running servers. Verify that the cluster scale up is noy impacted.
170
164
*
171
165
* @throws Exception
172
166
*/
@@ -209,7 +203,8 @@ public void testOPAdminReconnToDomain() throws Exception {
209
203
}
210
204
211
205
/**
212
- * Restart Operator and verify the liveness probe by killing all managed servers
206
+ * Stop Operator. Kill all managed servers. Restart Operator. Verify that it restarts all managed
207
+ * servers.
213
208
*
214
209
* @throws Exception
215
210
*/
@@ -252,7 +247,8 @@ public void testOPMSReconnToDomain() throws Exception {
252
247
}
253
248
254
249
/**
255
- * Verify the liveness probe by killing a managed server
250
+ * Stop Operator. Kill one managed server. Restart Operator. Verify that it restarts the killed
251
+ * managed server.
256
252
*
257
253
* @throws Exception
258
254
*/
@@ -282,12 +278,6 @@ public void testOPRestartDeadMS() throws Exception {
282
278
logger .info ("SUCCESS - " + testMethodName );
283
279
}
284
280
285
- /**
286
- * a help method to scale down cluster and verify
287
- *
288
- * @param decrNum - number of servers to scale down
289
- * @throws Exception
290
- */
291
281
private void scaleDownAndVarify (int decrNum ) throws Exception {
292
282
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
293
283
logTestBegin (testMethodName );
@@ -318,12 +308,6 @@ private void scaleDownAndVarify(int decrNum) throws Exception {
318
308
}
319
309
}
320
310
321
- /**
322
- * a help method to scale up cluster and verify
323
- *
324
- * @param incrNum - number of servers to scale up
325
- * @throws Exception
326
- */
327
311
private void scaleUpAndVarify (int incrNum ) throws Exception {
328
312
Map <String , Object > domainMap = domain .getDomainMap ();
329
313
String domainUid = domain .getDomainUid ();
@@ -341,12 +325,6 @@ private void scaleUpAndVarify(int incrNum) throws Exception {
341
325
varifyPodReady (replicas );
342
326
}
343
327
344
- /**
345
- * a help method to verify that server pods are running
346
- *
347
- * @param replicas - a number of replicas
348
- * @throws Exception
349
- */
350
328
private void varifyPodReady (int replicas ) throws Exception {
351
329
Map <String , Object > domainMap = domain .getDomainMap ();
352
330
String domainUid = domain .getDomainUid ();
@@ -375,11 +353,6 @@ private void varifyPodReady(int replicas) throws Exception {
375
353
}
376
354
}
377
355
378
- /**
379
- * a help method to return the number of replicas in cluster
380
- *
381
- * @throws Exception
382
- */
383
356
private int getReplicaCnt () throws Exception {
384
357
Map <String , Object > domainMap = domain .getDomainMap ();
385
358
String domainUid = domain .getDomainUid ();
0 commit comments