@Test void stopDoesNotDelayIfNotConfiguredTo() { final Jzonbie jzonbie = new Jzonbie(options()); final Stopwatch stopwatch = Stopwatch.createStarted(); jzonbie.stop(); stopwatch.stop(); assertThat(stopwatch.elapsed()).isLessThan(Duration.ofMillis(50)); }
public void stop() { httpPippo.stop(); if(httpsPippo != null) { httpsPippo.stop(); } waitAfterStop.ifPresent(wait -> { try { Thread.sleep(wait.toMillis()); } catch (InterruptedException ignored) {} }); }
Jzonbie implements JzonbieClient { public void stop() { httpPippo.stop(); if(httpsPippo != null) { httpsPippo.stop(); } waitAfterStop.ifPresent(wait -> { try { Thread.sleep(wait.toMillis()); } catch (InterruptedException ignored) {} }); } }
Jzonbie implements JzonbieClient { public void stop() { httpPippo.stop(); if(httpsPippo != null) { httpsPippo.stop(); } waitAfterStop.ifPresent(wait -> { try { Thread.sleep(wait.toMillis()); } catch (InterruptedException ignored) {} }); } Jzonbie();  Jzonbie(JzonbieOptions options); }
Jzonbie implements JzonbieClient { public void stop() { httpPippo.stop(); if(httpsPippo != null) { httpsPippo.stop(); } waitAfterStop.ifPresent(wait -> { try { Thread.sleep(wait.toMillis()); } catch (InterruptedException ignored) {} }); } Jzonbie();  Jzonbie(JzonbieOptions options); int getHttpPort(); int getHttpsPort(); @Override KeyStore getTruststore(); @Override void prime(AppRequest request, AppResponse response); @Override void prime(File file); @Override void prime(AppRequest request, DefaultAppResponse defaultAppResponse); @Override List<PrimedMapping> getCurrentPriming(); @Override List<Exchange> getHistory(); @Override List<AppRequest> getFailedRequests(); @Override void verify(AppRequest request, InvocationVerificationCriteria criteria); @Override void reset(); void stop(); }
Jzonbie implements JzonbieClient { public void stop() { httpPippo.stop(); if(httpsPippo != null) { httpsPippo.stop(); } waitAfterStop.ifPresent(wait -> { try { Thread.sleep(wait.toMillis()); } catch (InterruptedException ignored) {} }); } Jzonbie();  Jzonbie(JzonbieOptions options); int getHttpPort(); int getHttpsPort(); @Override KeyStore getTruststore(); @Override void prime(AppRequest request, AppResponse response); @Override void prime(File file); @Override void prime(AppRequest request, DefaultAppResponse defaultAppResponse); @Override List<PrimedMapping> getCurrentPriming(); @Override List<Exchange> getHistory(); @Override List<AppRequest> getFailedRequests(); @Override void verify(AppRequest request, InvocationVerificationCriteria criteria); @Override void reset(); void stop();  }