integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java
public static void renewK8sClusterLease(String projectRoot, String leaseId) throws Exception {
    if (leaseId != "") {
      LoggerHelper.getLocal().log(Level.INFO, "Renewing lease for leaseId " + leaseId);
      String command = projectRoot + "/src/integration-tests/bash/lease.sh -r " + leaseId;
      ExecResult execResult = ExecCommand.exec(command);
      if (execResult.exitValue() != 0) {
        LoggerHelper.getLocal().log(Level.INFO,
            "ERROR: Could not renew lease on k8s cluster for LEASE_ID="
                + leaseId
                + "Used "
                + projectRoot
                + "/src/integration-tests/bash/lease.sh -r "
                + leaseId
                + " to try renew the lease. "
                + "Some of the potential reasons for this failure are that another run"
                + "may have obtained the lease, the lease may have been externally "
                + "deleted, or the caller of the test may have forgotten to obtain the "
                + "lease before calling the test (using 'lease.sh -o \"$LEASE_ID\"'). "
                + "To force delete a lease no matter who owns the lease,"
                + "call 'lease.sh -f' or 'kubernetes delete cm acceptance-test-lease'"
                + "(this should only be done when sure there's no current java tests "
                + "that owns the lease).  To view the current lease holder,"
                + "use 'lease.sh -s'.  To disable this lease check, do not set"
                + "the LEASE_ID environment variable.");

        throw new RuntimeException("Could not renew lease on k8s cluster " + execResult.stderr());
      } else {
        LoggerHelper.getLocal().log(Level.INFO, "Renewed lease for leaseId " + leaseId);
      }
    }
  }
/**
   * renew cluster lease.
   * @param projectRoot project root
   * @param leaseId lease ID
   * @throws Exception on failure
   */
renew cluster lease.
@param projectRoot project root
@param leaseId lease ID
@throws Exception on failure
renew cluster lease . @param projectRoot project root @param leaseId lease ID @throws Exception on failure
public static void renewK8sClusterLease(String projectRoot, String leaseId) throws Exception {
    if (leaseId != "") {
      LoggerHelper.getLocal().log(Level.INFO, "Renewing lease for leaseId " + leaseId);
      String command = projectRoot + "/src/integration-tests/bash/lease.sh -r " + leaseId;
      ExecResult execResult = ExecCommand.exec(command);
      if (execResult.exitValue() != 0) {
        LoggerHelper.getLocal().log(Level.INFO,
            "ERROR: Could not renew lease on k8s cluster for LEASE_ID="
                + leaseId
                + "Used "
                + projectRoot
                + "/src/integration-tests/bash/lease.sh -r "
                + leaseId
                + " to try renew the lease. "
                + "Some of the potential reasons for this failure are that another run"
                + "may have obtained the lease, the lease may have been externally "
                + "deleted, or the caller of the test may have forgotten to obtain the "
                + "lease before calling the test (using 'lease.sh -o \"$LEASE_ID\"'). "
                + "To force delete a lease no matter who owns the lease,"
                + "call 'lease.sh -f' or 'kubernetes delete cm acceptance-test-lease'"
                + "(this should only be done when sure there's no current java tests "
                + "that owns the lease).  To view the current lease holder,"
                + "use 'lease.sh -s'.  To disable this lease check, do not set"
                + "the LEASE_ID environment variable.");
        throw new RuntimeException("Could not renew lease on k8s cluster " + execResult.stderr());
      } else {
        LoggerHelper.getLocal().log(Level.INFO, "Renewed lease for leaseId " + leaseId);
      }
    }
  }
public static void renewK8sClusterLease ( String projectRoot , String leaseId ) throws Exception { if ( leaseId != "" ) { LoggerHelper . getLocal ( ) . log ( Level . INFO , "Renewing lease for leaseId " + leaseId ) ; String command = projectRoot + "/src/integration-tests/bash/lease.sh -r " + leaseId ; ExecResult execResult = ExecCommand . exec ( command ) ; if ( execResult . exitValue ( ) != 0 ) { LoggerHelper . getLocal ( ) . log ( Level . INFO , "ERROR: Could not renew lease on k8s cluster for LEASE_ID=" + leaseId + "Used " + projectRoot + "/src/integration-tests/bash/lease.sh -r " + leaseId + " to try renew the lease. " + "Some of the potential reasons for this failure are that another run" + "may have obtained the lease, the lease may have been externally " + "deleted, or the caller of the test may have forgotten to obtain the " + "lease before calling the test (using 'lease.sh -o \"$LEASE_ID\"'). " + "To force delete a lease no matter who owns the lease," + "call 'lease.sh -f' or 'kubernetes delete cm acceptance-test-lease'" + "(this should only be done when sure there's no current java tests " + "that owns the lease).  To view the current lease holder," + "use 'lease.sh -s'.  To disable this lease check, do not set" + "the LEASE_ID environment variable." ) ; throw new RuntimeException ( "Could not renew lease on k8s cluster " + execResult . stderr ( ) ) ; } else { LoggerHelper . getLocal ( ) . log ( Level . INFO , "Renewed lease for leaseId " + leaseId ) ; } } }
renew cluster lease.
renew cluster lease .