integration-tests/src/test/java/oracle/kubernetes/operator/ItPodsShutdown.java
private static long shutdownServer(String serverName, String domainNS, String domainUid) throws Exception {
    long startTime;
    startTime = System.currentTimeMillis();
    String cmd = "kubectl delete pod " + domainUid + "-" + serverName + " -n " + domainNS;
    LoggerHelper.getLocal().log(Level.INFO, "command to shutdown server <" + serverName + "> is: " + cmd);
    ExecResult result = ExecCommand.exec(cmd);
    long terminationTime = 0;
    if (result.exitValue() != 0) {
      throw new Exception("FAILURE: command " + cmd + " failed, returned " + result.stderr());
    }
    TestUtils.checkPodCreated(domainUid + "-" + serverName, domainNS);
    long endTime = System.currentTimeMillis();
    terminationTime = endTime - startTime;
    return terminationTime;
  }
/**
   * Shutdown managed server and returns spent shutdown time.
   *
   * @throws Exception If failed to shutdown the server.
   */
Shutdown managed server and returns spent shutdown time.
@throws Exception If failed to shutdown the server.
Shutdown managed server and returns spent shutdown time . @throws Exception If failed to shutdown the server .
private static long shutdownServer(String serverName, String domainNS, String domainUid) throws Exception {
    long startTime;
    startTime = System.currentTimeMillis();
    String cmd = "kubectl delete pod " + domainUid + "-" + serverName + " -n " + domainNS;
    LoggerHelper.getLocal().log(Level.INFO, "command to shutdown server <" + serverName + "> is: " + cmd);
    ExecResult result = ExecCommand.exec(cmd);
    long terminationTime = 0;
    if (result.exitValue() != 0) {
      throw new Exception("FAILURE: command " + cmd + " failed, returned " + result.stderr());
    }
    TestUtils.checkPodCreated(domainUid + "-" + serverName, domainNS);
    long endTime = System.currentTimeMillis();
    terminationTime = endTime - startTime;
    return terminationTime;
  }
private static long shutdownServer ( String serverName , String domainNS , String domainUid ) throws Exception { long startTime ; startTime = System . currentTimeMillis ( ) ; String cmd = "kubectl delete pod " + domainUid + "-" + serverName + " -n " + domainNS ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "command to shutdown server <" + serverName + "> is: " + cmd ) ; ExecResult result = ExecCommand . exec ( cmd ) ; long terminationTime = 0 ; if ( result . exitValue ( ) != 0 ) { throw new Exception ( "FAILURE: command " + cmd + " failed, returned " + result . stderr ( ) ) ; } TestUtils . checkPodCreated ( domainUid + "-" + serverName , domainNS ) ; long endTime = System . currentTimeMillis ( ) ; terminationTime = endTime - startTime ; return terminationTime ; }
Shutdown managed server and returns spent shutdown time.
Shutdown managed server and returns spent shutdown time .