use of com.axway.ats.agent.core.threading.data.config.LoaderDataConfig in project ats-framework by Axway.
the class DisabledTest_MultiThreadedActionHandler method cancelAllQueuesBeforeStartPositive.
@Test
public void cancelAllQueuesBeforeStartPositive() throws Exception {
RampUpPattern pattern = new RampUpPattern(3, true, 10, 3000);
QueueExecutionStatistics.getInstance().initActionExecutionResults(QUEUE_1);
//first schedule the threads
actionHandler.scheduleActions("IP", QUEUE_1, -1, actionRequests, pattern, new LoaderDataConfig(), false);
actionHandler.cancelAllQueues();
expectedNumExecutions = 0;
}
use of com.axway.ats.agent.core.threading.data.config.LoaderDataConfig in project ats-framework by Axway.
the class DisabledTest_MultiThreadedActionHandler method executeActionsAllAtOncePatternBlockingVerifyNoDelay.
@Test
public void executeActionsAllAtOncePatternBlockingVerifyNoDelay() throws Exception {
AllAtOncePattern pattern = new AllAtOncePattern(5, true);
long startTime = Calendar.getInstance().getTimeInMillis();
QueueExecutionStatistics.getInstance().initActionExecutionResults(QUEUE_1);
actionHandler.executeActions("IP", QUEUE_1, -1, actionRequests, pattern, new LoaderDataConfig());
long endTime = Calendar.getInstance().getTimeInMillis();
assertTrue(endTime - startTime < 1000);
}
use of com.axway.ats.agent.core.threading.data.config.LoaderDataConfig in project ats-framework by Axway.
the class DisabledTest_MultiThreadedActionHandler method scheduleActionsRampUpPatternBlockingWithRampUpPositive.
@Test
public void scheduleActionsRampUpPatternBlockingWithRampUpPositive() throws Exception {
RampUpPattern pattern = new RampUpPattern(10, true, 1, 0, 5000, 2);
//then start the queue
long startTime = Calendar.getInstance().getTimeInMillis();
actionHandler.scheduleActions("IP", QUEUE_1, -1, actionRequests, pattern, new LoaderDataConfig(), false);
long executionTime = Calendar.getInstance().getTimeInMillis() - startTime;
assertTrue(executionTime < 1000);
}
use of com.axway.ats.agent.core.threading.data.config.LoaderDataConfig in project ats-framework by Axway.
the class DisabledTest_MultiThreadedActionHandler method finishedQueuesAreCleanedUpOnSchedule.
@Test
public void finishedQueuesAreCleanedUpOnSchedule() throws Exception {
AllAtOncePattern pattern = new AllAtOncePattern(1, true);
QueueExecutionStatistics.getInstance().initActionExecutionResults(QUEUE_1);
//first queue finished
actionHandler.executeActions("IP", QUEUE_1, -1, actionRequests, pattern, new LoaderDataConfig());
//second queue running
actionHandler.executeActions("IP", QUEUE_1, -1, actionRequests, pattern, new LoaderDataConfig());
//wait until the queue finishes
actionHandler.waitUntilAllQueuesFinish();
}
use of com.axway.ats.agent.core.threading.data.config.LoaderDataConfig in project ats-framework by Axway.
the class DisabledTest_MultiThreadedActionHandler method executeActionsAllAtOncePatternBlockingPositive.
@Test
public void executeActionsAllAtOncePatternBlockingPositive() throws Exception {
AllAtOncePattern pattern = new AllAtOncePattern(5, true);
QueueExecutionStatistics.getInstance().initActionExecutionResults(QUEUE_1);
actionHandler.executeActions("IP", QUEUE_1, -1, actionRequests, pattern, new LoaderDataConfig());
expectedNumExecutions = 5;
}
Aggregations