org.apache.qpid.server.logging
Class MemoryMessageStoreLoggingTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.qpid.test.utils.QpidTestCase
org.apache.qpid.test.utils.QpidBrokerTestCase
org.apache.qpid.server.logging.AbstractTestLogging
org.apache.qpid.server.logging.MemoryMessageStoreLoggingTest
- All Implemented Interfaces:
- junit.framework.Test
- Direct Known Subclasses:
- DerbyMessageStoreLoggingTest
public class MemoryMessageStoreLoggingTest
- extends AbstractTestLogging
The MessageStore test suite validates that the follow log messages as
specified in the Functional Specification.
This suite of tests validate that the MessageStore messages occur correctly
and according to the following format:
MST-1001 : Created :
MST-1003 : Closed
NOTE: Only for Persistent Stores
MST-1002 : Store location :
MST-1004 : Recovery Start [: ]
MST-1005 : Recovered messages for queue
MST-1006 : Recovery Complete [: ]
Fields inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
_broker, _brokerLanguage, _brokerLogPrefix, _brokerOutputStream, _brokerPersistent, _brokers, _configFile, _connectionFactory, _connections, _initialContext, _interleaveBrokerLog, _logger, _output, _outputFile, _testName, BROKER_READY, CONTENT, CPP, DEFAULT_MANAGEMENT_PORT, DEFAULT_MESSAGE_SIZE, DEFAULT_PORT, DEFAULT_SSL_PORT, DEFAULT_VM_PORT, EXTERNAL, INDEX, JAVA, LOGMONITOR_TIMEOUT, QPID_HOME, QpidHome, QUEUE, RECEIVE_TIMEOUT, TOPIC, VM |
Fields inherited from class org.apache.qpid.test.utils.QpidTestCase |
MEMORY_STORE_CLASS_NAME, MS_CLASS_NAME_KEY |
Methods inherited from class org.apache.qpid.server.logging.AbstractTestLogging |
assertLoggingNotYetOccured, dumpLogs, dumpLogs, filterResultsByVirtualHost, findMatches, fromActor, fromMessage, fromSubject, getChannelID, getConnectionID, getLog, getLogMessage, getLogMessageFromEnd, getMessageID, getMessageString, setLogMessagePrefix, splitResultsOnConnectionID, tearDown, validateMessageID, waitAndFindMatches, waitAndFindMatches, waitForMessage, waitForMessage |
Methods inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
cleanBroker, createMessage, createNextMessage, drainQueue, getBroker, getBrokerCommand, getClientConnection, getConfigurationStringProperty, getConnection, getConnection, getConnection, getConnectionFactory, getConnectionFactory, getConnectionURL, getInitialContext, getLogger, getManagementPort, getMessageSize, getPort, getPort, getTestConfigFile, getTestQueue, getTestQueueName, getTestVirtualhostsFile, isBroker010, isBroker08, isBrokerStorePersistent, isCppBroker, isExternalBroker, isJavaBroker, makeVirtualHostPersistent, reloadBrokerSecurityConfig, restartBroker, restartBroker, revertLoggingLevels, revertSystemProperties, runBare, saveTestConfiguration, saveTestVirtualhosts, sendMessage, sendMessage, sendMessage, setBrokerEnvironment, setBrokerOnlySystemProperty, setConfigurationProperty, setLoggerLevel, setMessageSize, setSystemProperty, setSystemProperty, setTestClientSystemProperty, startBroker, startBroker, stopBroker, stopBroker |
Methods inherited from class org.apache.qpid.test.utils.QpidTestCase |
getTestProfileMessageStoreClassName, run |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, runTest, setName, 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 |
MESSAGES_STORE_PREFIX
protected static final String MESSAGES_STORE_PREFIX
- See Also:
- Constant Field Values
MemoryMessageStoreLoggingTest
public MemoryMessageStoreLoggingTest()
setUp
public void setUp()
throws Exception
- Overrides:
setUp
in class AbstractTestLogging
- Throws:
Exception
testMessageStoreCreation
public void testMessageStoreCreation()
throws Exception
- Description:
During Virtualhost startup a MessageStore will be created. The first MST
message that must be logged is the MST-1001 MessageStore creation.
Input:
Default configuration
Output:
MST-1001 : Created :
Validation Steps:
1. The MST ID is correct
2. The is the correct MessageStore type as specified in the Default configuration
- Throws:
Exception
- caused by broker startup
testMessageStoreClose
public void testMessageStoreClose()
throws Exception
- Description:
During shutdown the MessageStore will also cleanly close. When this has
completed a MST-1003 closed message will be logged. No further messages
from this MessageStore will be logged after this message.
Input:
Default configuration
Output:
MST-1003 : Closed
Validation Steps:
1. The MST ID is correct
2. This is teh last log message from this MessageStore
- Throws:
Exception
- caused by broker startup
Licensed to the Apache Software Foundation