public class ServiceInFlightMessagesTestCase extends FunctionalTestCase
Modifier and Type | Field and Description |
---|---|
protected static int |
NUM_MESSAGES |
protected static int |
WAIT_TIME_MILLIS |
callbackCalled, CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, muleContext, RECEIVE_TIMEOUT, TEST_MESSAGE, TEST_PAYLOAD, WORKING_DIRECTORY_SYSTEM_PROPERTY_KEY, workingDirectory
DEFAULT_TEST_TIMEOUT_SECS, globalTimeout, logger, name, TEST_TIMEOUT_SYSTEM_PROPERTY, TESTING_MODE_PROPERTY_NAME
Constructor and Description |
---|
ServiceInFlightMessagesTestCase() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertNoLostMessages(int numMessages,
Service service)
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
|
protected void |
assertOutboundEmpty() |
protected void |
assertOutboundNotEmpty() |
protected void |
assertSedaQueueEmpty(Service service) |
protected void |
assertSedaQueueNotEmpty(Service service) |
protected MuleContext |
createMuleContext() |
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() . |
protected String |
getConfigFile() |
protected int |
getOutSize() |
protected int |
getQueueSize(String name) |
protected String |
getSedaQueueName(Service service) |
protected int |
getSedaQueueSize(Service service) |
protected void |
populateSedaQueue(Service service,
int numMessages) |
protected void |
recreateAndStartMuleContext() |
protected void |
startService(Service service) |
protected void |
stopService(Service service) |
void |
testInFlightMessagesPausedPersistentQueueServiceWhenServiceStopped() |
void |
testInFlightMessagesPausedServiceWhenServiceStopped() |
void |
testInFlightMessagesPersistentQueueServiceWhenMuleDisposed() |
void |
testInFlightMessagesPersistentQueueServiceWhenServiceStopped() |
void |
testInFlightMessagesWhenServiceStopped() |
clearFlowAssertions, getBuilder, getComponent, getComponent, getConfigFiles, getConfigResources, getFlowConstruct, getFunctionalTestComponent, getSubFlow, loadResource, loadResourceAsString, lookupFlowConstruct, runFlow, runFlow, runFlow, runFlowAndExpect, runFlowAndExpectProperty, runFlowNonBlocking, runFlowNonBlocking, runFlowNonBlocking, runFlowWithPayloadAndExpect, runSchedulersOnce, stopFlowConstruct, stopFlowSchedulers, testFlow, testFlow, testFlowNonBlocking, testFlowNonBlocking
addBuilders, configureMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, doSetUp, doSetUpBeforeMuleContextCreation, doTearDownAfterMuleContextDispose, getConfigurationResources, getFileInsideWorkingDirectory, getNonBlockingResponse, getNonBlockingTestEventUsingFlow, getSensingNullMessageProcessor, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestEventContext, getTestEventUsingFlow, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestMuleMessage, getTestMuleMessage, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTransactedInboundEndpoint, getTestTransformer, getTriggerableMessageSource, getTriggerableMessageSource, getWorkingDirectory, initialiseObject, isDisposeContextPerClass, isGracefulShutdown, isStartContext, setDisposeContextPerClass, setStartContext, setUpMuleContext
clearExcludedFlag, clearRequestContext, clearTestCaseName, createTestTimeoutRule, dumpFilteredThreadsInTest, getTestHeader, getTestTimeoutSecs, getTimeoutSystemProperty, initializeMuleTest, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isExcluded, isFailOnTimeout, isOffline, isTestIncludedInExclusionFile, takeTestCaseName
protected static final int WAIT_TIME_MILLIS
protected static final int NUM_MESSAGES
protected String getConfigFile()
getConfigFile
in class FunctionalTestCase
protected MuleContext createMuleContext() throws Exception
createMuleContext
in class AbstractMuleContextTestCase
Exception
protected void doTearDown() throws Exception
AbstractMuleContextTestCase
AbstractMuleContextTestCase.disposeContextPerTest()
.
Under normal circumstances this method could be replace with a
@After
annotated method.
doTearDown
in class AbstractMuleContextTestCase
Exception
- if something fails that should halt the testcasepublic void testInFlightMessagesWhenServiceStopped() throws Exception
Exception
public void testInFlightMessagesPausedServiceWhenServiceStopped() throws Exception
Exception
public void testInFlightMessagesPersistentQueueServiceWhenServiceStopped() throws Exception
Exception
public void testInFlightMessagesPausedPersistentQueueServiceWhenServiceStopped() throws Exception
Exception
public void testInFlightMessagesPersistentQueueServiceWhenMuleDisposed() throws Exception
Exception
protected void recreateAndStartMuleContext() throws Exception, MuleException
Exception
MuleException
protected void populateSedaQueue(Service service, int numMessages) throws MuleException, Exception
MuleException
Exception
protected void assertNoLostMessages(int numMessages, Service service) throws Exception
Exception
protected void assertSedaQueueEmpty(Service service) throws MuleException
MuleException
protected void assertSedaQueueNotEmpty(Service service) throws MuleException
MuleException
protected int getSedaQueueSize(Service service) throws MuleException
MuleException
protected int getQueueSize(String name) throws MuleException
MuleException
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.