new-integration-tests/src/test/java/oracle/weblogic/kubernetes/assertions/impl/Pod.java
public static boolean verifyRollingRestartOccurred(Map<String, DateTime> pods, int maxUnavailable, String namespace) {

    // check the pods list is not empty
    if (pods.isEmpty()) {
      getLogger().severe("The pods list is empty");
      return false;
    }

    // reusable condition factory
    ConditionFactory retry
        = with().pollInterval(5, SECONDS).atMost(5, MINUTES).await();

    for (Map.Entry<String, DateTime> entry : pods.entrySet()) {
      // check pods are replaced
      retry
          .conditionEvaluationListener(condition -> getLogger().info("Waiting for pod {0} to be "
          + "restarted in namespace {1} "
          + "(elapsed time {2}ms, remaining time {3}ms)",
          entry.getKey(),
          namespace,
          condition.getElapsedTimeInMS(),
          condition.getRemainingTimeInMS()))
          .until(assertDoesNotThrow(() -> podRestarted(entry.getKey(), pods, maxUnavailable, namespace),
              String.format("pod %s didn't restart in namespace %s", entry.getKey(), namespace)));

      // check pods are in ready status
      retry
          .conditionEvaluationListener(condition -> getLogger().info("Waiting for pod {0} to be "
          + "ready in namespace {1} "
          + "(elapsed time {2}ms, remaining time {3}ms)",
          entry.getKey(),
          namespace,
          condition.getElapsedTimeInMS(),
          condition.getRemainingTimeInMS()))
          .until(assertDoesNotThrow(() -> podReady(namespace, null, entry.getKey()),
              String.format("pod %s didn't become ready in namespace %s", entry.getKey(), namespace)));
    }

    return true;
  }
/**
   * Verify pods are restarted in a rolling fashion with not more than maxUnavailable pods are restarted concurrently.
   * @param pods map of pod names with its creation time stamps
   * @param maxUnavailable number of pods can concurrently restart at the same time
   * @param namespace name of the namespace in which the pod restart status to be checked
   * @return true if pods are restarted in a rolling fashion
   */
Verify pods are restarted in a rolling fashion with not more than maxUnavailable pods are restarted concurrently.
@param pods map of pod names with its creation time stamps
@param maxUnavailable number of pods can concurrently restart at the same time
@param namespace name of the namespace in which the pod restart status to be checked
@return true if pods are restarted in a rolling fashion
Verify pods are restarted in a rolling fashion with not more than maxUnavailable pods are restarted concurrently . @param pods map of pod names with its creation time stamps @param maxUnavailable number of pods can concurrently restart at the same time @param namespace name of the namespace in which the pod restart status to be checked @return true if pods are restarted in a rolling fashion
public static boolean verifyRollingRestartOccurred(Map<String, DateTime> pods, int maxUnavailable, String namespace) {
    if (pods.isEmpty()) {
      getLogger().severe("The pods list is empty");
      return false;
    }
    ConditionFactory retry
        = with().pollInterval(5, SECONDS).atMost(5, MINUTES).await();
    for (Map.Entry<String, DateTime> entry : pods.entrySet()) {
      retry
          .conditionEvaluationListener(condition -> getLogger().info("Waiting for pod {0} to be "
          + "restarted in namespace {1} "
          + "(elapsed time {2}ms, remaining time {3}ms)",
          entry.getKey(),
          namespace,
          condition.getElapsedTimeInMS(),
          condition.getRemainingTimeInMS()))
          .until(assertDoesNotThrow(() -> podRestarted(entry.getKey(), pods, maxUnavailable, namespace),
              String.format("pod %s didn't restart in namespace %s", entry.getKey(), namespace)));
      retry
          .conditionEvaluationListener(condition -> getLogger().info("Waiting for pod {0} to be "
          + "ready in namespace {1} "
          + "(elapsed time {2}ms, remaining time {3}ms)",
          entry.getKey(),
          namespace,
          condition.getElapsedTimeInMS(),
          condition.getRemainingTimeInMS()))
          .until(assertDoesNotThrow(() -> podReady(namespace, null, entry.getKey()),
              String.format("pod %s didn't become ready in namespace %s", entry.getKey(), namespace)));
    }
    return true;
  }
public static boolean verifyRollingRestartOccurred ( Map < String , DateTime > pods , int maxUnavailable , String namespace ) { if ( pods . isEmpty ( ) ) { getLogger ( ) . severe ( "The pods list is empty" ) ; return false ; } ConditionFactory retry = with ( ) . pollInterval ( 5 , SECONDS ) . atMost ( 5 , MINUTES ) . await ( ) ; for ( Map . Entry < String , DateTime > entry : pods . entrySet ( ) ) { retry . conditionEvaluationListener ( condition -> getLogger ( ) . info ( "Waiting for pod {0} to be " + "restarted in namespace {1} " + "(elapsed time {2}ms, remaining time {3}ms)" , entry . getKey ( ) , namespace , condition . getElapsedTimeInMS ( ) , condition . getRemainingTimeInMS ( ) ) ) . until ( assertDoesNotThrow ( ( ) -> podRestarted ( entry . getKey ( ) , pods , maxUnavailable , namespace ) , String . format ( "pod %s didn't restart in namespace %s" , entry . getKey ( ) , namespace ) ) ) ; retry . conditionEvaluationListener ( condition -> getLogger ( ) . info ( "Waiting for pod {0} to be " + "ready in namespace {1} " + "(elapsed time {2}ms, remaining time {3}ms)" , entry . getKey ( ) , namespace , condition . getElapsedTimeInMS ( ) , condition . getRemainingTimeInMS ( ) ) ) . until ( assertDoesNotThrow ( ( ) -> podReady ( namespace , null , entry . getKey ( ) ) , String . format ( "pod %s didn't become ready in namespace %s" , entry . getKey ( ) , namespace ) ) ) ; } return true ; }
Verify pods are restarted in a rolling fashion with not more than maxUnavailable pods are restarted concurrently.
Verify pods are restarted in a rolling fashion with not more than maxUnavailable pods are restarted concurrently .
// check the pods list is not empty // reusable condition factory // check pods are replaced // check pods are in ready status