use of org.mule.runtime.core.internal.processor.strategy.WorkQueueProcessingStrategyFactory.WorkQueueProcessingStrategy in project mule by mulesoft.
the class WorkQueueProcessingStrategyTestCase method rejectedExecution.
@Test
@Description("If IO pool is busy OVERLOAD error is thrown")
public void rejectedExecution() throws Exception {
flow = flowBuilder.get().processors(blockingProcessor).processingStrategyFactory((context, prefix) -> new WorkQueueProcessingStrategy(() -> new RejectingScheduler(blocking))).build();
flow.initialise();
flow.start();
expectRejected();
processFlow(testEvent());
}
use of org.mule.runtime.core.internal.processor.strategy.WorkQueueProcessingStrategyFactory.WorkQueueProcessingStrategy in project mule by mulesoft.
the class WorkQueueProcessingStrategyTestCase method blockingRejectedExecution.
@Test
@Description("If IO pool is busy OVERLOAD error is thrown")
public void blockingRejectedExecution() throws Exception {
Scheduler blockingSchedulerSpy = spy(blocking);
Scheduler rejectingSchedulerSpy = spy(new RejectingScheduler(blockingSchedulerSpy));
flow = flowBuilder.get().processors(blockingProcessor).processingStrategyFactory((context, prefix) -> new WorkQueueProcessingStrategy(() -> rejectingSchedulerSpy)).build();
flow.initialise();
flow.start();
expectRejected();
processFlow(testEvent());
}
Aggregations