Skip to content

Instantly share code, notes, and snippets.

@pmlopes
Created July 1, 2015 09:05
Show Gist options
  • Save pmlopes/c46f1c2a7cb964d0b59e to your computer and use it in GitHub Desktop.
Save pmlopes/c46f1c2a7cb964d0b59e to your computer and use it in GitHub Desktop.
test
@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