integration-tests/src/test/java/oracle/kubernetes/operator/ItMultipleClusters.java
@Test
  public void testCreateDomainTwoClusterWdtInImage() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String domainUid = "twoclusterdomainwdt";
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);

    Domain domain = null;
    boolean testCompletedSuccessfully = false;
    try {
      Map<String, Object> domainMap =
          createDomainInImageMap(getNewSuffixCount(), true, testClassName);
      domainMap.put("domainUID", domainUid);
      domainMap.put("customDomainTemplate", customDomainTemplate);
      domainMap.put("namespace", domainNS1);
      domainMap.put(
          "customWdtTemplate",
          BaseTest.getProjectRoot()
              + "/integration-tests/src/test/resources/multipleclusters/wdtmultipledynclusters.yml");
      domain = TestUtils.createDomain(domainMap);
      domain.verifyDomainCreated();

      String cluster2PodName1 = domainUid + "-managed-server-21";
      String cluster2PodName2 = domainUid + "-managed-server-22";

      TestUtils.checkPodReady(cluster2PodName1, domainNS1);
      TestUtils.checkPodReady(cluster2PodName2, domainNS1);

      TestUtils.checkServiceCreated(cluster2PodName1, domainNS1);
      TestUtils.checkServiceCreated(cluster2PodName2, domainNS1);

      TestUtils.resolveServiceName(cluster2PodName1,
          domainUid + "-" + domain.getAdminServerName(), domainNS1, retriesToResolveServiceName);
      TestUtils.resolveServiceName(cluster2PodName2,
          domainUid + "-" + domain.getAdminServerName(), domainNS1, retriesToResolveServiceName);

      testBasicUseCases(domain, false);
      domain.testWlsLivenessProbe();
      testCompletedSuccessfully = true;
    } finally {
      if (domain != null && (JENKINS || testCompletedSuccessfully)) {
        TestUtils.deleteWeblogicDomainResources(domain.getDomainUid());
      }
      if (domain != null) {
        domain.deleteImage();
      }
    }
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - {0}", testMethodName);
  }
/**
   * Create 2 dynamic clusters in a domain using WDT in inimage each having 2 managed servers.
   * Verify the managed servers are running and verify the basic use cases.
   *
   * @throws Exception exception
   */
Create 2 dynamic clusters in a domain using WDT in inimage each having 2 managed servers.
Verify the managed servers are running and verify the basic use cases.

@throws Exception exception
Create 2 dynamic clusters in a domain using WDT in inimage each having 2 managed servers . Verify the managed servers are running and verify the basic use cases . @throws Exception exception
@Test
  public void testCreateDomainTwoClusterWdtInImage() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String domainUid = "twoclusterdomainwdt";
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);
    Domain domain = null;
    boolean testCompletedSuccessfully = false;
    try {
      Map<String, Object> domainMap =
          createDomainInImageMap(getNewSuffixCount(), true, testClassName);
      domainMap.put("domainUID", domainUid);
      domainMap.put("customDomainTemplate", customDomainTemplate);
      domainMap.put("namespace", domainNS1);
      domainMap.put(
          "customWdtTemplate",
          BaseTest.getProjectRoot()
              + "/integration-tests/src/test/resources/multipleclusters/wdtmultipledynclusters.yml");
      domain = TestUtils.createDomain(domainMap);
      domain.verifyDomainCreated();
      String cluster2PodName1 = domainUid + "-managed-server-21";
      String cluster2PodName2 = domainUid + "-managed-server-22";
      TestUtils.checkPodReady(cluster2PodName1, domainNS1);
      TestUtils.checkPodReady(cluster2PodName2, domainNS1);
      TestUtils.checkServiceCreated(cluster2PodName1, domainNS1);
      TestUtils.checkServiceCreated(cluster2PodName2, domainNS1);
      TestUtils.resolveServiceName(cluster2PodName1,
          domainUid + "-" + domain.getAdminServerName(), domainNS1, retriesToResolveServiceName);
      TestUtils.resolveServiceName(cluster2PodName2,
          domainUid + "-" + domain.getAdminServerName(), domainNS1, retriesToResolveServiceName);
      testBasicUseCases(domain, false);
      domain.testWlsLivenessProbe();
      testCompletedSuccessfully = true;
    } finally {
      if (domain != null && (JENKINS || testCompletedSuccessfully)) {
        TestUtils.deleteWeblogicDomainResources(domain.getDomainUid());
      }
      if (domain != null) {
        domain.deleteImage();
      }
    }
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - {0}", testMethodName);
  }
@ Test public void testCreateDomainTwoClusterWdtInImage ( ) throws Exception { Assumptions . assumeTrue ( FULLTEST ) ; String domainUid = "twoclusterdomainwdt" ; String testMethodName = new Object ( ) { } . getClass ( ) . getEnclosingMethod ( ) . getName ( ) ; logTestBegin ( testMethodName ) ; Domain domain = null ; boolean testCompletedSuccessfully = false ; try { Map < String , Object > domainMap = createDomainInImageMap ( getNewSuffixCount ( ) , true , testClassName ) ; domainMap . put ( "domainUID" , domainUid ) ; domainMap . put ( "customDomainTemplate" , customDomainTemplate ) ; domainMap . put ( "namespace" , domainNS1 ) ; domainMap . put ( "customWdtTemplate" , BaseTest . getProjectRoot ( ) + "/integration-tests/src/test/resources/multipleclusters/wdtmultipledynclusters.yml" ) ; domain = TestUtils . createDomain ( domainMap ) ; domain . verifyDomainCreated ( ) ; String cluster2PodName1 = domainUid + "-managed-server-21" ; String cluster2PodName2 = domainUid + "-managed-server-22" ; TestUtils . checkPodReady ( cluster2PodName1 , domainNS1 ) ; TestUtils . checkPodReady ( cluster2PodName2 , domainNS1 ) ; TestUtils . checkServiceCreated ( cluster2PodName1 , domainNS1 ) ; TestUtils . checkServiceCreated ( cluster2PodName2 , domainNS1 ) ; TestUtils . resolveServiceName ( cluster2PodName1 , domainUid + "-" + domain . getAdminServerName ( ) , domainNS1 , retriesToResolveServiceName ) ; TestUtils . resolveServiceName ( cluster2PodName2 , domainUid + "-" + domain . getAdminServerName ( ) , domainNS1 , retriesToResolveServiceName ) ; testBasicUseCases ( domain , false ) ; domain . testWlsLivenessProbe ( ) ; testCompletedSuccessfully = true ; } finally { if ( domain != null && ( JENKINS || testCompletedSuccessfully ) ) { TestUtils . deleteWeblogicDomainResources ( domain . getDomainUid ( ) ) ; } if ( domain != null ) { domain . deleteImage ( ) ; } } LoggerHelper . getLocal ( ) . log ( Level . INFO , "SUCCESS - {0}" , testMethodName ) ; }
Create 2 dynamic clusters in a domain using WDT in inimage each having 2 managed servers.
Create 2 dynamic clusters in a domain using WDT in inimage each having 2 managed servers .