@@ -233,6 +233,88 @@ public void testTwoDomainsManagedByTwoOperators() throws Exception {
233
233
logger .info ("SUCCESS - " + testMethodName );
234
234
}
235
235
236
+
237
+ /**
238
+ * Create one operator if it is not running. Create domain domain1 and domain2 dynamic cluster in
239
+ * default namespace, managed by operator1. Both domains share one PV. Verify scaling for domain2
240
+ * cluster from 2 to 3 servers and back to 2, plus verify no impact on domain1. Cycle domain1 down
241
+ * and back up, plus verify no impact on domain2. shutdown by the domains using the delete
242
+ * resource script from samples.
243
+ *
244
+ * <p>ToDo: configured cluster support is removed from samples, modify the test to create
245
+ *
246
+ * @throws Exception exception
247
+ */
248
+ @ Test
249
+ public void testTwoDomainsManagedByOneOperatorSharingPV () throws Exception {
250
+ Assume .assumeFalse (QUICKTEST );
251
+ String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
252
+ logTestBegin (testMethodName );
253
+ logger .info ("Creating Domain domain1 & verifing the domain creation" );
254
+
255
+ logger .info ("Checking if operator1 and domain1 are running, if not creating" );
256
+ if (operator1 == null ) {
257
+ operator1 = TestUtils .createOperator (OPERATOR1_YAML );
258
+ }
259
+
260
+ Domain domain1 = null , domain2 = null ;
261
+ boolean testCompletedSuccessfully = false ;
262
+ try {
263
+ // load input yaml to map and add configOverrides
264
+ Map <String , Object > domain1Map = TestUtils .loadYaml (DOMAINONSHARINGPV_WLST_YAML );
265
+ domain1Map .put ("domainUID" , "d1onpv" );
266
+ domain1Map .put ("adminNodePort" , new Integer ("30711" ));
267
+ domain1Map .put ("t3ChannelPort" , new Integer ("30011" ));
268
+ domain1Map .put ("voyagerWebPort" , new Integer ("30388" ));
269
+ domain1 = TestUtils .createDomain (domain1Map );
270
+ domain1 .verifyDomainCreated ();
271
+ testBasicUseCases (domain1 );
272
+
273
+ Map <String , Object > domain2Map = TestUtils .loadYaml (DOMAINONSHARINGPV_WLST_YAML );
274
+ domain2Map .put ("domainUID" , "d2onpv" );
275
+ domain2Map .put ("adminNodePort" , new Integer ("30712" ));
276
+ domain2Map .put ("t3ChannelPort" , new Integer ("30021" ));
277
+ // wdtDomainMap.put("clusterType", "Configured");
278
+ domain2Map .put ("voyagerWebPort" , new Integer ("30399" ));
279
+ domain2 = TestUtils .createDomain (domain2Map );
280
+ domain2 .verifyDomainCreated ();
281
+ testBasicUseCases (domain2 );
282
+ logger .info ("Verify the only remaining running domain domain1 is unaffected" );
283
+ domain1 .verifyDomainCreated ();
284
+
285
+ testClusterScaling (operator1 , domain2 );
286
+
287
+ logger .info ("Verify the only remaining running domain domain1 is unaffected" );
288
+ domain1 .verifyDomainCreated ();
289
+
290
+ logger .info ("Destroy and create domain1 and verify no impact on domain2" );
291
+ domain1 .destroy ();
292
+ domain1 .create ();
293
+
294
+ logger .info ("Verify no impact on domain2" );
295
+ domain2 .verifyDomainCreated ();
296
+ testCompletedSuccessfully = true ;
297
+
298
+ } finally {
299
+ String domainUidsToBeDeleted = "" ;
300
+
301
+ if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
302
+ domainUidsToBeDeleted = domain1 .getDomainUid ();
303
+ }
304
+ if (domain2 != null && (JENKINS || testCompletedSuccessfully )) {
305
+ domainUidsToBeDeleted = domainUidsToBeDeleted + "," + domain2 .getDomainUid ();
306
+ }
307
+ if (!domainUidsToBeDeleted .equals ("" )) {
308
+ logger .info ("About to delete domains: " + domainUidsToBeDeleted );
309
+ TestUtils .deleteWeblogicDomainResources (domainUidsToBeDeleted );
310
+ TestUtils .verifyAfterDeletion (domain1 );
311
+ TestUtils .verifyAfterDeletion (domain2 );
312
+ }
313
+ }
314
+ logger .info ("SUCCESS - " + testMethodName );
315
+ }
316
+
317
+
236
318
/**
237
319
* Create operator if its not running and create domain with serverStartPolicy="ADMIN_ONLY".
238
320
* Verify only admin server is created. Make domain configuration change and restart the domain.
0 commit comments