Search in sources :

Example 1 with ThrottlingInterceptor

use of com.adaptris.core.interceptor.ThrottlingInterceptor in project interlok by adaptris.

the class WorkflowManagerTest method testConstructor_WithInterceptor_NoRuntimeInfoFactoryRegistration.

@Test
public void testConstructor_WithInterceptor_NoRuntimeInfoFactoryRegistration() throws Exception {
    String adapterName = this.getClass().getSimpleName() + "." + getName();
    Adapter adapter = createAdapter(adapterName);
    AdapterManager adapterManager = new AdapterManager(adapter);
    Channel channel = createChannel("c1");
    ChannelManager channelManager = new ChannelManager(channel, adapterManager);
    StandardWorkflow workflow = createWorkflow("w1");
    workflow.setDisableDefaultMessageCount(true);
    workflow.getInterceptors().add(new ThrottlingInterceptor());
    WorkflowManager workflowManager = new WorkflowManager(workflow, channelManager);
    assertEquals(0, workflowManager.getChildRuntimeInfoComponents().size());
}
Also used : StandardWorkflow(com.adaptris.core.StandardWorkflow) ThrottlingInterceptor(com.adaptris.core.interceptor.ThrottlingInterceptor) Channel(com.adaptris.core.Channel) Adapter(com.adaptris.core.Adapter) Test(org.junit.Test)

Aggregations

Adapter (com.adaptris.core.Adapter)1 Channel (com.adaptris.core.Channel)1 StandardWorkflow (com.adaptris.core.StandardWorkflow)1 ThrottlingInterceptor (com.adaptris.core.interceptor.ThrottlingInterceptor)1 Test (org.junit.Test)1