Package com.openshift.client.fakes

Examples of com.openshift.client.fakes.WaitingHttpServerFake.stop()


      // assert
      assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
          .isLessThan(serverDelay)
          .isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
    } finally {
      serverFake.stop();
    }
  }

  @Test
  public void shouldRespectGivenTimeoutDELETE() throws Throwable {
View Full Code Here


      // assert
      assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
          .isLessThan(serverDelay)
          .isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
    } finally {
      serverFake.stop();
    }
  }

  @Test
  public void shouldRespectGivenTimeoutPUT() throws Throwable {
View Full Code Here

      // assert
      assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
          .isLessThan(serverDelay)
          .isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
    } finally {
      serverFake.stop();
    }
  }

  @Test
  public void shouldRespectGivenTimeoutGET() throws Throwable {
View Full Code Here

      // assert
      assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
          .isLessThan(serverDelay)
          .isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
    } finally {
      serverFake.stop();
    }
  }

  @Test
  public void shouldFallbackToOpenShiftTimeout() throws Throwable {
View Full Code Here

      // assert
      assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
          .isLessThan(serverDelay)
          .isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
    } finally {
      serverFake.stop();
      System.clearProperty(IHttpClient.SYSPROP_OPENSHIFT_READ_TIMEOUT);
    }
  }

  @Test
View Full Code Here

      // assert
      assertThat(System.currentTimeMillis() - startTime)
          .isGreaterThan(configuration.getTimeout() - 20)
          .isLessThan(configuration.getTimeout() + 20);
    } finally {
      serverFake.stop();
    }
  }

  @Test
  public void shouldRespectSystemConfigurationTimeoutOverridingDefaultTimeout() throws Throwable {
View Full Code Here

      // assert
      assertThat(System.currentTimeMillis() - startTime)
          .isGreaterThan(configuration.getTimeout() - 20)
          .isLessThan(configuration.getTimeout() + 20);
    } finally {
      serverFake.stop();
    }
  }

  @Test
  public void shouldRespectUserConfigurationTimeoutOverridingSystemConfigurationTimeout() throws Throwable {
View Full Code Here

      // assert
      assertThat(System.currentTimeMillis() - startTime)
          .isGreaterThan(configuration.getTimeout() - 20)
          .isLessThan(configuration.getTimeout() + 20);
    } finally {
      serverFake.stop();
    }
  }

  @Test
  public void shouldRespectSystemPropertiesTimeoutOverridingUserConfigurationTimeout() throws Throwable {
View Full Code Here

      // assert
      assertThat(System.currentTimeMillis() - startTime)
          .isGreaterThan(configuration.getTimeout() - 20)
          .isLessThan(configuration.getTimeout() + 20);
    } finally {
      serverFake.stop();
    }
  }

  @Test
  public void shouldFallbackToDefaultSystemPropertyTimeout() throws Throwable {
View Full Code Here

      // assert
      assertThat(System.currentTimeMillis() - startTime).isGreaterThan(timeout)
          .isLessThan(serverDelay)
          .isLessThan(IHttpClient.DEFAULT_READ_TIMEOUT);
    } finally {
      serverFake.stop();
      restoreSystemProperty(IHttpClient.SYSPROP_DEFAULT_READ_TIMEOUT, timeoutBackup);
    }
  }

  @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.