Assert.assertEquals(delay, 900000);
}
@Test
public void TestPeriodicPolicy() throws IvoryException, InterruptedException {
AbstractRerunPolicy periodic = new PeriodicPolicy();
long delay = periodic.getDelay(new Frequency("minutes(2)"), 2);
Assert.assertEquals(delay, 120000);
delay = periodic.getDelay(new Frequency("minutes(2)"), 5);
Assert.assertEquals(delay, 120000);
long currentTime = System.currentTimeMillis();
//Thread.sleep(1000);
delay = periodic.getDelay(new Frequency("minutes(3)"), new Date(
currentTime), new Date(currentTime + 1 * 60
* 60 * 1000));
Assert.assertEquals(delay, 180000);
}