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

    Map<String, Object> shutdownProps = new HashMap();
    shutdownProps.put("timeoutSeconds", 60);
    shutdownProps.put("shutdownType", "Forced");
    shutdownProps.put("ignoreSessions", true);
    List<Map<String,Object>> shutdownPropsClusters = new ArrayList<>();
    Map<String, Object> shutdownPropsMyCluster = new HashMap();
    shutdownPropsMyCluster.put("cluster-1", shutdownProps);
    shutdownPropsClusters.add(shutdownPropsMyCluster);
    Map<String, Object> shutdownPropOpt = new HashMap();
    shutdownPropOpt.put("cluster",shutdownPropsClusters);
    Domain domain = null;
    try {
      domain = createDomain(domainNSShutOpCluster,shutdownPropOpt);
      Assertions.assertNotNull(domain,
          domainNSShutOpCluster
              + " failed to create, returns null");
      Assertions.assertTrue(checkShutdownUpdatedProp(domain.getDomainUid()
          + "-admin-server", domain.getDomainNs(),"Graceful"),
          domain.getDomainUid()
              + "-admin-server: "
              + " shutdown property does not match the expected : shutdownType=Graceful");
      Assertions.assertTrue(checkShutdownUpdatedProp(domain.getDomainUid()
          + "-managed-server1", domain.getDomainNs(),"Forced"),
          domain.getDomainUid()
              + "-managed-server1: "
              + " shutdown property does not match the expected : shutdownType=Forced");
    } finally {
      LoggerHelper.getLocal().log(
          Level.INFO, "Deleting domain");
      if (domain != null) {
        TestUtils.deleteWeblogicDomainResources(domain.getDomainUid());
      }
    }
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - {0}", testMethodName);
  }
/**
   * Start domain with added shutdown options at the cluster level
   * and verify values are propagated to all managed servers in the cluster.
   *
   * @throws Exception If domain cannot be started or failed to verify shutdown options
   */
Start domain with added shutdown options at the cluster level
and verify values are propagated to all managed servers in the cluster.

@throws Exception If domain cannot be started or failed to verify shutdown options
Start domain with added shutdown options at the cluster level and verify values are propagated to all managed servers in the cluster . @throws Exception If domain cannot be started or failed to verify shutdown options
@Test
  public void testAddShutdownOptionToCluster() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);
    Map<String, Object> shutdownProps = new HashMap();
    shutdownProps.put("timeoutSeconds", 60);
    shutdownProps.put("shutdownType", "Forced");
    shutdownProps.put("ignoreSessions", true);
    List<Map<String,Object>> shutdownPropsClusters = new ArrayList<>();
    Map<String, Object> shutdownPropsMyCluster = new HashMap();
    shutdownPropsMyCluster.put("cluster-1", shutdownProps);
    shutdownPropsClusters.add(shutdownPropsMyCluster);
    Map<String, Object> shutdownPropOpt = new HashMap();
    shutdownPropOpt.put("cluster",shutdownPropsClusters);
    Domain domain = null;
    try {
      domain = createDomain(domainNSShutOpCluster,shutdownPropOpt);
      Assertions.assertNotNull(domain,
          domainNSShutOpCluster
              + " failed to create, returns null");
      Assertions.assertTrue(checkShutdownUpdatedProp(domain.getDomainUid()
          + "-admin-server", domain.getDomainNs(),"Graceful"),
          domain.getDomainUid()
              + "-admin-server: "
              + " shutdown property does not match the expected : shutdownType=Graceful");
      Assertions.assertTrue(checkShutdownUpdatedProp(domain.getDomainUid()
          + "-managed-server1", domain.getDomainNs(),"Forced"),
          domain.getDomainUid()
              + "-managed-server1: "
              + " shutdown property does not match the expected : shutdownType=Forced");
    } finally {
      LoggerHelper.getLocal().log(
          Level.INFO, "Deleting domain");
      if (domain != null) {
        TestUtils.deleteWeblogicDomainResources(domain.getDomainUid());
      }
    }
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - {0}", testMethodName);
  }
@ Test public void testAddShutdownOptionToCluster ( ) throws Exception { Assumptions . assumeTrue ( FULLTEST ) ; String testMethodName = new Object ( ) { } . getClass ( ) . getEnclosingMethod ( ) . getName ( ) ; logTestBegin ( testMethodName ) ; Map < String , Object > shutdownProps = new HashMap ( ) ; shutdownProps . put ( "timeoutSeconds" , 60 ) ; shutdownProps . put ( "shutdownType" , "Forced" ) ; shutdownProps . put ( "ignoreSessions" , true ) ; List < Map < String , Object > > shutdownPropsClusters = new ArrayList < > ( ) ; Map < String , Object > shutdownPropsMyCluster = new HashMap ( ) ; shutdownPropsMyCluster . put ( "cluster-1" , shutdownProps ) ; shutdownPropsClusters . add ( shutdownPropsMyCluster ) ; Map < String , Object > shutdownPropOpt = new HashMap ( ) ; shutdownPropOpt . put ( "cluster" , shutdownPropsClusters ) ; Domain domain = null ; try { domain = createDomain ( domainNSShutOpCluster , shutdownPropOpt ) ; Assertions . assertNotNull ( domain , domainNSShutOpCluster + " failed to create, returns null" ) ; Assertions . assertTrue ( checkShutdownUpdatedProp ( domain . getDomainUid ( ) + "-admin-server" , domain . getDomainNs ( ) , "Graceful" ) , domain . getDomainUid ( ) + "-admin-server: " + " shutdown property does not match the expected : shutdownType=Graceful" ) ; Assertions . assertTrue ( checkShutdownUpdatedProp ( domain . getDomainUid ( ) + "-managed-server1" , domain . getDomainNs ( ) , "Forced" ) , domain . getDomainUid ( ) + "-managed-server1: " + " shutdown property does not match the expected : shutdownType=Forced" ) ; } finally { LoggerHelper . getLocal ( ) . log ( Level . INFO , "Deleting domain" ) ; if ( domain != null ) { TestUtils . deleteWeblogicDomainResources ( domain . getDomainUid ( ) ) ; } } LoggerHelper . getLocal ( ) . log ( Level . INFO , "SUCCESS - {0}" , testMethodName ) ; }
Start domain with added shutdown options at the cluster level
 and verify values are propagated to all managed servers in the cluster.
Start domain with added shutdown options at the cluster level and verify values are propagated to all managed servers in the cluster .