Skip to content

Commit

Permalink
FALCON-2097. Adding UT to the new method for getting next instance ti…
Browse files Browse the repository at this point in the history
…me with Delay.
  • Loading branch information
sandeepSamudrala committed Aug 5, 2016
1 parent a94d4fe commit 271318b
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -471,4 +471,12 @@ public void testIsClusterUsedByEntity() throws Exception {
Assert.assertFalse(EntityUtil.isEntityDependentOnCluster(process, "fakeCluster"));
}

@Test
public void testGetNextInstanceTimeWithDelay() throws Exception {
Date date = getDate("2016-08-10 03:00 UTC");
Frequency delay = new Frequency("hours(2)");
Date nextInstanceWithDelay = EntityUtil.getNextInstanceTimeWithDelay(date, delay, TimeZone.getTimeZone("UTC"));
Assert.assertEquals(nextInstanceWithDelay, getDate("2016-08-10 05:00 UTC"));
}

}

0 comments on commit 271318b

Please sign in to comment.