Open abelsromero opened 4 years ago
I am struggling to test a verticle isolated and all documentation and examples found only show how to test rest endpoints.
Something as simple as this, always fails with timeout
@Rule public RunTestOnContext rule = new RunTestOnContext(); @Rule public Timeout timeout = Timeout.seconds(5L); @Test public void should_run_verticle(TestContext context) { // given final String address = "hello"; final String message = "world"; // when final Async async = context.async(); rule.vertx() .eventBus() .publish(address, message) .consumer(address, event -> { context.assertEquals(message, event.body()); System.out.println(event.body()); async.complete(); }); async.awaitSuccess(); }
I am struggling to test a verticle isolated and all documentation and examples found only show how to test rest endpoints.
Something as simple as this, always fails with timeout