org.mule.transport
Class DispatcherThreadingProfileTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.mule.tck.AbstractMuleTestCase
              extended by org.mule.transport.DispatcherThreadingProfileTestCase
All Implemented Interfaces:
junit.framework.Test, TestCaseWatchdogTimeoutHandler

public class DispatcherThreadingProfileTestCase
extends AbstractMuleTestCase

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
           
 
Nested classes/interfaces inherited from class org.mule.tck.AbstractMuleTestCase
AbstractMuleTestCase.TestInfo
 
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.AbstractMuleTestCase
callbackCalled, CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, DEFAULT_MULE_TEST_TIMEOUT_SECS, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, logger, muleContext, numPorts, ports, PROPERTY_MULE_TEST_TIMEOUT, RECEIVE_TIMEOUT, TEST_MESSAGE, testTimeoutSecs
 
Constructor Summary
DispatcherThreadingProfileTestCase()
           
 
Method Summary
protected  void createTestConnectorWithSingleDispatcherThread(int exhaustedAction)
           
protected  void createTestConnectorWithSingleDispatcherThread(int threads, int exhaustedAction, long waitTimeout, int maxBufferSize)
           
protected  void doTearDown()
          Exactly the same a AbstractMuleTestCase.tearDown() in normal JUnit test cases.
 void testAbortExhaustedAction()
           
 void testDefaultRunExhaustedAction()
           
 void testDefaultThreadingProfileConfiguration()
           
 void testDiscardExhaustedAction()
           
 void testDiscardOldestExhaustedAction()
           
 void testWaitExhaustedAction()
           
 void testWaitTimeoutExhaustedAction()
           
 
Methods inherited from class org.mule.tck.AbstractMuleTestCase
addBuilders, checkPorts, configureMuleContext, createMuleContext, createObject, createObject, createTestInfo, createWatchdog, disposeManager, doSetUp, findFreePorts, getBuilder, getConfigurationResources, getPorts, getSensingNullMessageProcessor, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestEventContext, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEvent, getTestInboundEvent, getTestInboundEvent, getTestInfo, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTimeoutSecs, getTestTransactedInboundEndpoint, getTestTransformer, getTriggerableMessageSource, getTriggerableMessageSource, giveTheTestSomeTimeToCleanUpAndThenKillIt, handleTimeout, initialiseObject, initTestTimeoutSecs, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isDisposeManagerPerSuite, isExcluded, isGracefulShutdown, isOffline, isPortFree, isStartContext, registerTestMethod, run, runBare, setDisposeManagerPerSuite, setFailOnTimeout, setName, setStartContext, setUp, suitePostTearDown, suitePreSetUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runTest, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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: AbstractMuleTestCase
Exactly the same a AbstractMuleTestCase.tearDown() in normal JUnit test cases. this is called after a test method has been called.

Overrides:
doTearDown in class AbstractMuleTestCase
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-2010 MuleSoft, Inc.. All Rights Reserved.