Commit 0a727eb8 authored by cijujoseph's avatar cijujoseph

Updated the timer assertions

parent e1489341
......@@ -22,6 +22,7 @@ import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import static org.junit.Assert.*;
import static com.alfresco.aps.testutils.TestUtilsConstants.*;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:activiti.cfg.xml", "classpath:common-beans-and-mocks.xml" })
......@@ -67,9 +68,9 @@ public class BoundaryTimerCatchProcessUnitTest extends AbstractTest {
//Assert in seconds and execute/action timer
unitTestHelpers.assertTimerJobsTimeInSecondsLowerThan(300, true);
unitTestHelpers.assertTimerJob(1, 5, TIME_UNIT_MINUTE, true);
//Assert days and execute/action timer
unitTestHelpers.assertTimerJobDateLowerThan(1, true);
unitTestHelpers.assertTimerJob(1, 1, TIME_UNIT_DAY, true);
unitTestHelpers.assertNullProcessInstance(processInstance.getProcessInstanceId());
}
......
......@@ -34,6 +34,7 @@ import org.activiti.engine.task.Task;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import static com.alfresco.aps.testutils.TestUtilsConstants.*;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
......@@ -133,7 +134,7 @@ public class CustomListenersUnitTest extends AbstractTest {
taskService.complete(task.getId());
unitTestHelpers.assertTimerJobsTimeInSecondsLowerThan(120, true);
unitTestHelpers.assertTimerJob(1, 2, TIME_UNIT_MINUTE, true);
verify(timerFiredEventListener, times(1)).onEvent((ActivitiEvent) any());
......
......@@ -21,6 +21,7 @@ import org.activiti.engine.runtime.ProcessInstance;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import static com.alfresco.aps.testutils.TestUtilsConstants.*;
import static org.junit.Assert.*;
@RunWith(SpringJUnit4ClassRunner.class)
......@@ -67,9 +68,9 @@ public class IntermediateTimerCatchProcessUnitTest extends AbstractTest {
//Assert in seconds and execute/action timer
unitTestHelpers.assertTimerJobsTimeInSecondsLowerThan(300, true);
unitTestHelpers.assertTimerJob(1, 5, TIME_UNIT_MINUTE, true);
//Assert days and execute/action timer
unitTestHelpers.assertTimerJobDateLowerThan(1, true);
unitTestHelpers.assertTimerJob(1, 1, TIME_UNIT_DAY, true);
unitTestHelpers.assertNullProcessInstance(processInstance.getProcessInstanceId());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment