integration-tests/src/test/java/oracle/kubernetes/operator/ItOperatorUpgrade.java
private void checkCrdVersion() throws Exception {
    boolean result = false;
    ExecResult exec = null;
    LoggerHelper.getLocal().log(
        Level.INFO,
        "Checking for the CRD Version "
            + getCrdVersion()
            + " in a loop ");
    for (int i = 0; i < BaseTest.getMaxIterationsPod(); i++) {
      exec = ExecCommand.exec(
              "kubectl get crd domains.weblogic.oracle -o jsonpath='{.spec.versions[?(@.storage==true)].name}'");
      if (exec.stdout().contains(getCrdVersion())) {
        LoggerHelper.getLocal().log(Level.INFO, "Got Expected CRD Version");
        result = true;
        break;
      }
      try { 
        Thread.sleep(BaseTest.getWaitTimePod() * 1000); 
      } catch (InterruptedException e) {
        LoggerHelper.getLocal().log(Level.INFO,"Got InterruptedException " + e);
      } 
    }
    if (!result) {
      throw new Exception("FAILURE: Expceted CRD version " + getCrdVersion() 
         + "but got " + exec.stdout());
    }
  }
/**
   * Checks the expected Upgraded Version of CustomResourceDefintion (CRD).
   *
   * @throws Exception when version does not match
   */
Checks the expected Upgraded Version of CustomResourceDefintion (CRD).
@throws Exception when version does not match
Checks the expected Upgraded Version of CustomResourceDefintion ( CRD ) . @throws Exception when version does not match
private void checkCrdVersion() throws Exception {
    boolean result = false;
    ExecResult exec = null;
    LoggerHelper.getLocal().log(
        Level.INFO,
        "Checking for the CRD Version "
            + getCrdVersion()
            + " in a loop ");
    for (int i = 0; i < BaseTest.getMaxIterationsPod(); i++) {
      exec = ExecCommand.exec(
              "kubectl get crd domains.weblogic.oracle -o jsonpath='{.spec.versions[?(@.storage==true)].name}'");
      if (exec.stdout().contains(getCrdVersion())) {
        LoggerHelper.getLocal().log(Level.INFO, "Got Expected CRD Version");
        result = true;
        break;
      }
      try { 
        Thread.sleep(BaseTest.getWaitTimePod() * 1000); 
      } catch (InterruptedException e) {
        LoggerHelper.getLocal().log(Level.INFO,"Got InterruptedException " + e);
      } 
    }
    if (!result) {
      throw new Exception("FAILURE: Expceted CRD version " + getCrdVersion() 
         + "but got " + exec.stdout());
    }
  }
private void checkCrdVersion ( ) throws Exception { boolean result = false ; ExecResult exec = null ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Checking for the CRD Version " + getCrdVersion ( ) + " in a loop " ) ; for ( int i = 0 ; i < BaseTest . getMaxIterationsPod ( ) ; i ++ ) { exec = ExecCommand . exec ( "kubectl get crd domains.weblogic.oracle -o jsonpath='{.spec.versions[?(@.storage==true)].name}'" ) ; if ( exec . stdout ( ) . contains ( getCrdVersion ( ) ) ) { LoggerHelper . getLocal ( ) . log ( Level . INFO , "Got Expected CRD Version" ) ; result = true ; break ; } try { Thread . sleep ( BaseTest . getWaitTimePod ( ) * 1000 ) ; } catch ( InterruptedException e ) { LoggerHelper . getLocal ( ) . log ( Level . INFO , "Got InterruptedException " + e ) ; } } if ( ! result ) { throw new Exception ( "FAILURE: Expceted CRD version " + getCrdVersion ( ) + "but got " + exec . stdout ( ) ) ; } }
Checks the expected Upgraded Version of CustomResourceDefintion (CRD).
Checks the expected Upgraded Version of CustomResourceDefintion ( CRD ) .