Created
October 6, 2015 09:08
-
-
Save purplefox/4b72f8b891d846ce68a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testCloseRegistryOnVertxClose(TestContext context) throws Exception { | |
Vertx vertx = Vertx.vertx(); | |
CommandRegistryImpl registry = (CommandRegistryImpl) CommandRegistry.get(vertx); | |
context.assertFalse(registry.isClosed()); | |
CountDownLatch latch = new CountDownLatch(1); | |
vertx.close(context.asyncAssertSuccess(v -> { | |
context.assertTrue(registry.isClosed()); | |
latch.countDown(); | |
})); | |
latch.await(10, TimeUnit.SECONDS); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment