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

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

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