amitjoy commented on a change in pull request #29: URL: https://github.com/apache/felix-dev/pull/29#discussion_r447606804
########## File path: healthcheck/core/src/test/java/org/apache/felix/hc/core/impl/executor/async/cron/CronSchedulerTest.java ########## @@ -0,0 +1,114 @@ +package org.apache.felix.hc.core.impl.executor.async.cron; + +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.felix.hc.core.impl.executor.async.cron.SampleCronJob1.Callback; +import org.junit.Assert; +import org.junit.Test; + +public class CronSchedulerTest extends Assert { + + private static final Object SYNC_OBJECT = new Object(); + + @Test + public void checkSchedulerCheckSingleThread() throws InterruptedException { + try (final CronScheduler scheduler = new CronScheduler(Executors.newFixedThreadPool(1), 0, 1, TimeUnit.SECONDS, "T1")) { + final int nIterations = 3; + + final SampleCronJob1 service = new SampleCronJob2(s -> { + System.out.println("Iteration: " + s.counter); Review comment: fixed ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org