Esempio n. 1
0
 @Override
 protected void tearDown() throws Exception {
   CountDownLatch latch = new CountDownLatch(1);
   resolver.close(
       onSuccess(
           res -> {
             latch.countDown();
           }));
   awaitLatch(latch);
   super.tearDown();
 }
Esempio n. 2
0
 @Test
 public void testDeleteCacheDir() throws Exception {
   Vertx vertx2 = vertx();
   FileResolver resolver2 = new FileResolver(vertx2);
   File file = resolver2.resolveFile(webRoot + "/somefile.html");
   assertTrue(file.exists());
   File cacheDir = file.getParentFile().getParentFile();
   assertTrue(cacheDir.exists());
   resolver2.close(
       onSuccess(
           res -> {
             assertFalse(cacheDir.exists());
             vertx2.close(
                 res2 -> {
                   testComplete();
                 });
           }));
   await();
 }