Correctly add futures to list in test

Motivation:

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

Modifications:

Add futures to list.

Result:

More correct test.
This commit is contained in:
Norman Maurer 2016-10-10 14:33:21 +02:00
parent 947216b70e
commit 273778c96c

View File

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