-
-
Save jponge/079120cd9cc5a4b4ec07e771b06e8805 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 | |
@DisplayName("⏱ Count 3 timer ticks") | |
void countThreeTicks(Vertx vertx, VertxTestContext testContext) { | |
AtomicInteger counter = new AtomicInteger(); | |
vertx.setPeriodic(100, id -> { | |
if (counter.incrementAndGet() == 3) { | |
testContext.completeNow(); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment