new-integration-tests/src/test/java/oracle/weblogic/kubernetes/assertions/impl/Kubernetes.java
public static boolean isPodRestarted(
      String podName,
      String namespace, DateTime timestamp) throws ApiException {
    LoggingFacade logger = getLogger();
    DateTime newCreationTime = getPodCreationTimestamp(namespace, "", podName);

    if (newCreationTime != null
        && newCreationTime.isAfter(timestamp)) {
      logger.info("Pod {0}: new creation time {1} is later than the last creation time {2}",
          podName, newCreationTime, timestamp);
      return true;
    }
    logger.info("Pod {0}: new creation time {1} is NOT later than the last creation time {2}",
        podName, newCreationTime, timestamp);
    return false;
  }
/**
   * Check if a pod is restarted based on podCreationTimestamp.
   *
   * @param podName the name of the pod to check for
   * @param namespace in which the pod is running
   * @param timestamp the initial podCreationTimestamp
   * @return true if the pod's creation timestamp is later than the initial PodCreationTimestamp
   * @throws ApiException when query fails
   */
Check if a pod is restarted based on podCreationTimestamp.
Check if a pod is restarted based on podCreationTimestamp .
public static boolean isPodRestarted(
      String podName,
      String namespace, DateTime timestamp) throws ApiException {
    LoggingFacade logger = getLogger();
    DateTime newCreationTime = getPodCreationTimestamp(namespace, "", podName);
    if (newCreationTime != null
        && newCreationTime.isAfter(timestamp)) {
      logger.info("Pod {0}: new creation time {1} is later than the last creation time {2}",
          podName, newCreationTime, timestamp);
      return true;
    }
    logger.info("Pod {0}: new creation time {1} is NOT later than the last creation time {2}",
        podName, newCreationTime, timestamp);
    return false;
  }
public static boolean isPodRestarted ( String podName , String namespace , DateTime timestamp ) throws ApiException { LoggingFacade logger = getLogger ( ) ; DateTime newCreationTime = getPodCreationTimestamp ( namespace , "" , podName ) ; if ( newCreationTime != null && newCreationTime . isAfter ( timestamp ) ) { logger . info ( "Pod {0}: new creation time {1} is later than the last creation time {2}" , podName , newCreationTime , timestamp ) ; return true ; } logger . info ( "Pod {0}: new creation time {1} is NOT later than the last creation time {2}" , podName , newCreationTime , timestamp ) ; return false ; }
Check if a pod is restarted based on podCreationTimestamp.
Check if a pod is restarted based on podCreationTimestamp .