mirror of https://github.com/apache/activemq.git
AMQ-6602 - Removing lambdas for java 7 compatibility
(cherry picked from commit 1f53b124bc
)
This commit is contained in:
parent
7ca411feee
commit
789f82b34b
|
@ -46,14 +46,24 @@ public class TaskRunnerFactoryTest {
|
|||
final List<TaskRunner> runners = Collections.synchronizedList(new ArrayList<>(10));
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
service.execute(() -> {
|
||||
service.execute(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
latch1.await();
|
||||
} catch (InterruptedException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
runners.add(factory.createTaskRunner(() -> true, "task") );
|
||||
runners.add(factory.createTaskRunner(new Task() {
|
||||
|
||||
@Override
|
||||
public boolean iterate() {
|
||||
return false;
|
||||
}
|
||||
}, "task"));
|
||||
latch2.countDown();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue