diff --git a/src/test/java/org/jboss/threads/ScheduledEnhancedQueueExecutorTest.java b/src/test/java/org/jboss/threads/ScheduledEnhancedQueueExecutorTest.java index fc6749e..eef521b 100644 --- a/src/test/java/org/jboss/threads/ScheduledEnhancedQueueExecutorTest.java +++ b/src/test/java/org/jboss/threads/ScheduledEnhancedQueueExecutorTest.java @@ -146,9 +146,9 @@ public void testFixedDelayExecution() throws Exception { @Test public void testThatFixedDelayTerminatesTask() { EnhancedQueueExecutor eqe = new EnhancedQueueExecutor.Builder().build(); + final ArrayList times = new ArrayList<>(); var r = new Runnable() { final ScheduledFuture future = eqe.scheduleWithFixedDelay(this, 0, 100, TimeUnit.MILLISECONDS); - final ArrayList times = new ArrayList<>(); public void run() { times.add(LocalDateTime.now()); if (times.size() >= 5) {