Search in sources :

Example 1 with BlockingProcessingStrategyFactory

use of org.mule.runtime.core.internal.processor.strategy.BlockingProcessingStrategyFactory in project mule by mulesoft.

the class DefaultFlowTestCase method restartWithBlockingProcessingStrategy.

@Test
public void restartWithBlockingProcessingStrategy() throws Exception {
    after();
    flow = (DefaultFlow) Flow.builder(FLOW_NAME, muleContext).source(flow.getSource()).processors(flow.getProcessors()).processingStrategyFactory(new BlockingProcessingStrategyFactory()).build();
    flow.initialise();
    flow.start();
    flow.stop();
    flow.start();
    CoreEvent response = triggerFunction.apply(directInboundMessageSource.getListener(), testEvent());
    assertThat(response, not(nullValue()));
}
Also used : CoreEvent(org.mule.runtime.core.api.event.CoreEvent) BlockingProcessingStrategyFactory(org.mule.runtime.core.internal.processor.strategy.BlockingProcessingStrategyFactory) Test(org.junit.Test)

Example 2 with BlockingProcessingStrategyFactory

use of org.mule.runtime.core.internal.processor.strategy.BlockingProcessingStrategyFactory in project mule by mulesoft.

the class AsyncDelegateMessageProcessorTestCase method processWithBlockingProcessingStrategy.

@Test
public void processWithBlockingProcessingStrategy() throws Exception {
    flow.dispose();
    flow = builder("flow", muleContext).processingStrategyFactory(new BlockingProcessingStrategyFactory()).build();
    flow.initialise();
    flow.start();
    process();
}
Also used : BlockingProcessingStrategyFactory(org.mule.runtime.core.internal.processor.strategy.BlockingProcessingStrategyFactory) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 BlockingProcessingStrategyFactory (org.mule.runtime.core.internal.processor.strategy.BlockingProcessingStrategyFactory)2 CoreEvent (org.mule.runtime.core.api.event.CoreEvent)1