@Test public void download500(TestContext context) throws IOException { stubFor(get(urlEqualTo("/" + ZIP_NAME)) .willReturn(aResponse() .withStatus(500))); Vertx vertx = rule.vertx(); Async async = context.async(); File dest = folder.newFolder(); dest.delete(); new ElasticsearchInstaller(new io.vertx.rxjava.core.Vertx(vertx)) .download(downloadUrl, dest.getAbsolutePath()) .subscribe(path -> context.fail("Download is expected to fail"), err -> { verify(getRequestedFor(urlEqualTo("/" + ZIP_NAME))); context.assertFalse(dest.exists()); async.complete(); }); }
public Single<String> download(String downloadUrl, String destPath) { return download(downloadUrl, destPath, true); }
ElasticsearchInstaller { public Single<String> download(String downloadUrl, String destPath) { return download(downloadUrl, destPath, true); } }
ElasticsearchInstaller { public Single<String> download(String downloadUrl, String destPath) { return download(downloadUrl, destPath, true); } ElasticsearchInstaller(Vertx vertx); }
ElasticsearchInstaller { public Single<String> download(String downloadUrl, String destPath) { return download(downloadUrl, destPath, true); } ElasticsearchInstaller(Vertx vertx); Single<String> download(String downloadUrl, String destPath); Single<String> download(String downloadUrl, String destPath,
      boolean strip); }
ElasticsearchInstaller { public Single<String> download(String downloadUrl, String destPath) { return download(downloadUrl, destPath, true); } ElasticsearchInstaller(Vertx vertx); Single<String> download(String downloadUrl, String destPath); Single<String> download(String downloadUrl, String destPath,
      boolean strip);  }