@@ -0,0 +1,1042 @@
+package org.pinae.rafiki;%0A%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport org.apache.log4j.Logger;%0Aimport org.pinae.rafiki.job.Job;%0Aimport org.pinae.rafiki.job.JobException;%0Aimport org.pinae.rafiki.task.Task;%0Aimport org.pinae.rafiki.task.TaskContainer;%0Aimport org.pinae.rafiki.trigger.impl.SimpleTrigger;%0A%0Apublic class TimeoutTest %7B%0A%09private static Logger logger = Logger.getLogger(TimeoutTest.class);%0A%09%0A%09private static final int ONE_SECOND = 1000;%0A%09%0A%09public static void main(String arg%5B%5D) throws Exception %7B%0A%09%09Task task = new Task();%0A%09%09Job job = new Job() %7B%0A%09%09%09public String getName() %7B%0A%09%09%09%09return %22TimeOutJob%22;%0A%09%09%09%7D%0A%09%0A%09%09%09public boolean execute() throws JobException %7B%0A%09%09%09%09try %7B%0A%09%09%09%09%09TimeUnit.SECONDS.sleep(10);%0A%09%09%09%09%7D catch (InterruptedException e) %7B%0A%0A%09%09%09%09%7D%0A%09%09%09%09%0A%09%09%09%09return true;%0A%09%09%09%7D%0A%09%09%7D;%0A%09%0A%09%09task.setName(%22HelloJob%22);%0A%09%09task.setJob(job);%0A%09%09task.setTrigger(new SimpleTrigger(5, 15 * ONE_SECOND));%0A%09%09task.setTimeout(5 * ONE_SECOND);%0A%09%09%0A%09%09TaskContainer container = new TaskContainer();%0A%09%09container.addTask(task);%0A%09%09container.start(true);%0A%09%7D%0A%7D%0A

Add TimeoutTest