Created
July 1, 2015 09:05
-
-
Save pmlopes/c46f1c2a7cb964d0b59e to your computer and use it in GitHub Desktop.
test
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 testLoad() { | |
final AtomicInteger counter = new AtomicInteger(); | |
int repetitions = 10000; | |
counter.set(repetitions); | |
for (int i = 0; i < repetitions; i++) { | |
redis.get("unknown", res -> { | |
if (res.failed()) { | |
fail(res.cause().getMessage()); | |
return; | |
} | |
if (counter.decrementAndGet() == 0) { | |
testComplete(); | |
} | |
}); | |
} | |
await(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment