org.mule.transport
Class DispatcherThreadingProfileTestCase

java.lang.Object
  extended by org.mule.tck.junit4.AbstractMuleTestCase
      extended by org.mule.tck.junit4.AbstractMuleContextTestCase
          extended by org.mule.transport.DispatcherThreadingProfileTestCase

public class DispatcherThreadingProfileTestCase
extends AbstractMuleContextTestCase

This test case tests the both dispatcher threading profile and it's rejection handlers and AbstractConnector dispatch logic by dispatch events using TestConnector with varying threading profile configurations and asserting the correct outcome. See: MULE-4752


Nested Class Summary
 class DispatcherThreadingProfileTestCase.DelayTestMessageDispatcher
           
 
Field Summary
static int DELAY_TIME
           
static int LONGER_WAIT_TIME
           
static int SERIAL_WAIT_TIME
           
static int WAIT_TIME
           
 
Fields inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase
callbackCalled, CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, muleContext, RECEIVE_TIMEOUT, TEST_MESSAGE
 
Fields inherited from class org.mule.tck.junit4.AbstractMuleTestCase
DEFAULT_TEST_TIMEOUT_SECS, globalTimeout, logger, name, TEST_TIMEOUT_SYSTEM_PROPERTY
 
Constructor Summary
DispatcherThreadingProfileTestCase()
           
 
Method Summary
protected  void createTestConnectorWithSingleDispatcherThread(int exhaustedAction)
           
protected  void createTestConnectorWithSingleDispatcherThread(int threads, int exhaustedAction, long waitTimeout, int maxBufferSize)
           
protected  void doTearDown()
          Enables the adding of extra behavior on the tear down stage of a test before the mule context is disposed in AbstractMuleContextTestCase.disposeContextPerTest().
 void testAbortExhaustedAction()
           
 void testDefaultRunExhaustedAction()
           
 void testDefaultThreadingProfileConfiguration()
           
 void testDiscardExhaustedAction()
           
 void testDiscardOldestExhaustedAction()
           
 void testWaitExhaustedAction()
           
 void testWaitTimeoutExhaustedAction()
           
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase
addBuilders, configureMuleContext, createMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, doSetUp, getBuilder, getConfigurationResources, getSensingNullMessageProcessor, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestEventContext, getTestEventUsingFlow, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTransactedInboundEndpoint, getTestTransformer, getTriggerableMessageSource, getTriggerableMessageSource, initialiseObject, isDisposeContextPerClass, isGracefulShutdown, isStartContext, setDisposeContextPerClass, setStartContext, setUpMuleContext
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleTestCase
clearExcludedFlag, clearRequestContext, createTestTimeoutRule, getTestHeader, getTestTimeoutSecs, getTimeoutSystemProperty, initializeMuleTest, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isExcluded, isFailOnTimeout, isOffline, isTestIncludedInExclusionFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELAY_TIME

public static int DELAY_TIME

WAIT_TIME

public static int WAIT_TIME

SERIAL_WAIT_TIME

public static int SERIAL_WAIT_TIME

LONGER_WAIT_TIME

public static int LONGER_WAIT_TIME
Constructor Detail

DispatcherThreadingProfileTestCase

public DispatcherThreadingProfileTestCase()
Method Detail

doTearDown

protected void doTearDown()
                   throws Exception
Description copied from class: AbstractMuleContextTestCase
Enables the adding of extra behavior on the tear down stage of a test before the mule context is disposed in AbstractMuleContextTestCase.disposeContextPerTest().

Under normal circumstances this method could be replace with a @After annotated method.

Overrides:
doTearDown in class AbstractMuleContextTestCase
Throws:
Exception - if something fails that should halt the testcase

testDefaultThreadingProfileConfiguration

public void testDefaultThreadingProfileConfiguration()
                                              throws MuleException
Throws:
MuleException

testDefaultRunExhaustedAction

public void testDefaultRunExhaustedAction()
                                   throws Exception
Throws:
Exception

testWaitExhaustedAction

public void testWaitExhaustedAction()
                             throws Exception
Throws:
Exception

testWaitTimeoutExhaustedAction

public void testWaitTimeoutExhaustedAction()
                                    throws Exception
Throws:
Exception

testAbortExhaustedAction

public void testAbortExhaustedAction()
                              throws Exception
Throws:
Exception

testDiscardExhaustedAction

public void testDiscardExhaustedAction()
                                throws Exception
Throws:
Exception

testDiscardOldestExhaustedAction

public void testDiscardOldestExhaustedAction()
                                      throws Exception
Throws:
Exception

createTestConnectorWithSingleDispatcherThread

protected void createTestConnectorWithSingleDispatcherThread(int exhaustedAction)
                                                      throws MuleException
Throws:
MuleException

createTestConnectorWithSingleDispatcherThread

protected void createTestConnectorWithSingleDispatcherThread(int threads,
                                                             int exhaustedAction,
                                                             long waitTimeout,
                                                             int maxBufferSize)
                                                      throws MuleException
Throws:
MuleException


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.