Skip to content

Commit

Permalink
Correctly add futures to list in test
Browse files Browse the repository at this point in the history
Motivation:

We missed to add the futures to the list in the test.

Modifications:

Add futures to list.

Result:

More correct test.
  • Loading branch information
normanmaurer committed Nov 1, 2016
1 parent 947216b commit 273778c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static void execute(EventExecutorGroup group, CountDownLatch startLatch)

for (int i = 1 ; i <= tasks; i++) {
final int id = i;
executor.execute(new Runnable() {
futures.add(executor.submit(new Runnable() {
@Override
public void run() {
try {
Expand All @@ -122,7 +122,7 @@ public void run() {
latch.countDown();
}
}
});
}));
}
latch.await();
for (Future<?> future: futures) {
Expand Down

0 comments on commit 273778c

Please sign in to comment.