org.mule.test.integration.service
Class ServiceInFlightMessagesTestCase
java.lang.Object
org.mule.tck.junit4.AbstractMuleTestCase
org.mule.tck.junit4.AbstractMuleContextTestCase
org.mule.tck.junit4.FunctionalTestCase
org.mule.test.integration.service.ServiceInFlightMessagesTestCase
- Direct Known Subclasses:
- ServiceInFlightMessagesJMSTestCase
public class ServiceInFlightMessagesTestCase
- extends FunctionalTestCase
Methods inherited from class org.mule.tck.junit4.FunctionalTestCase |
clearFlowAssertions, getBuilder, getComponent, getComponent, getFlowConstruct, getFunctionalTestComponent, loadResource, loadResourceAsString, stopFlowConstruct, testFlow, testFlow |
Methods inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase |
addBuilders, configureMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, doSetUp, 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 |
WAIT_TIME_MILLIS
protected static final int WAIT_TIME_MILLIS
- See Also:
- Constant Field Values
NUM_MESSAGES
protected static final int NUM_MESSAGES
- See Also:
- Constant Field Values
ServiceInFlightMessagesTestCase
public ServiceInFlightMessagesTestCase()
getConfigResources
protected String getConfigResources()
- Specified by:
getConfigResources
in class FunctionalTestCase
createMuleContext
protected MuleContext createMuleContext()
throws Exception
- Overrides:
createMuleContext
in class AbstractMuleContextTestCase
- Throws:
Exception
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
testInFlightMessagesWhenServiceStopped
public void testInFlightMessagesWhenServiceStopped()
throws Exception
- Throws:
Exception
testInFlightMessagesPausedServiceWhenServiceStopped
public void testInFlightMessagesPausedServiceWhenServiceStopped()
throws Exception
- Throws:
Exception
testInFlightMessagesPersistentQueueServiceWhenServiceStopped
public void testInFlightMessagesPersistentQueueServiceWhenServiceStopped()
throws Exception
- Throws:
Exception
testInFlightMessagesPausedPersistentQueueServiceWhenServiceStopped
public void testInFlightMessagesPausedPersistentQueueServiceWhenServiceStopped()
throws Exception
- Throws:
Exception
testInFlightMessagesPersistentQueueServiceWhenMuleDisposed
public void testInFlightMessagesPersistentQueueServiceWhenMuleDisposed()
throws Exception
- Throws:
Exception
recreateAndStartMuleContext
protected void recreateAndStartMuleContext()
throws Exception,
MuleException
- Throws:
Exception
MuleException
populateSedaQueue
protected void populateSedaQueue(Service service,
int numMessages)
throws MuleException,
Exception
- Throws:
MuleException
Exception
assertNoLostMessages
protected void assertNoLostMessages(int numMessages,
Service service)
throws Exception
- After each run the following should total 500 events: 1) Event still in SEDA
queue 2) Events dispatched to outbound vm endpooint 3) Events that were unable
to be sent to stopped service and raised exceptions
- Throws:
Exception
assertSedaQueueEmpty
protected void assertSedaQueueEmpty(Service service)
throws MuleException
- Throws:
MuleException
assertSedaQueueNotEmpty
protected void assertSedaQueueNotEmpty(Service service)
throws MuleException
- Throws:
MuleException
assertOutboundEmpty
protected void assertOutboundEmpty()
throws Exception
- Throws:
Exception
assertOutboundNotEmpty
protected void assertOutboundNotEmpty()
throws Exception
- Throws:
Exception
getSedaQueueSize
protected int getSedaQueueSize(Service service)
throws MuleException
- Throws:
MuleException
getSedaQueueName
protected String getSedaQueueName(Service service)
getOutSize
protected int getOutSize()
throws Exception
- Throws:
Exception
getQueueSize
protected int getQueueSize(String name)
throws MuleException
- Throws:
MuleException
stopService
protected void stopService(Service service)
throws Exception
- Throws:
Exception
startService
protected void startService(Service service)
throws Exception
- Throws:
Exception
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.