org.apache.qpid.server.logging
Class ExchangeLoggingTest
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.ExchangeLoggingTest
- All Implemented Interfaces:
- junit.framework.Test
public class ExchangeLoggingTest
- extends AbstractTestLogging
Exchange
The Exchange test suite validates that the follow log messages as specified in the Functional Specification.
This suite of tests validate that the Exchange messages occur correctly and according to the following format:
EXH-1001 : Create : [Durable] Type: Name:
EXH-1002 : Deleted
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 |
Method Summary |
void |
setUp()
|
void |
testExchangeCreate()
Description:
When an exchange is created an EXH-1001 message is logged. |
void |
testExchangeCreateDurable()
Description:
When a durable exchange is created an EXH-1001 message is logged with the Durable tag. |
void |
testExchangeDelete()
Description:
An Exchange can be deleted through an AMQP ExchangeDelete method. |
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 |
EXH_PREFIX
static final String EXH_PREFIX
- See Also:
- Constant Field Values
_connection
Connection _connection
_session
Session _session
_queue
Queue _queue
_name
String _name
_type
String _type
ExchangeLoggingTest
public ExchangeLoggingTest()
setUp
public void setUp()
throws Exception
- Overrides:
setUp
in class AbstractTestLogging
- Throws:
Exception
testExchangeCreateDurable
public void testExchangeCreateDurable()
throws JMSException,
IOException
- Description:
When a durable exchange is created an EXH-1001 message is logged with the Durable tag. This will be the first message from this exchange.
Input:
1. Running broker
2. Client requests a durable exchange be created.
Output:
EXH-1001 : Create : Durable Type: Name:
Validation Steps:
3. The EXH ID is correct
4. The Durable tag is present in the message
- Throws:
JMSException
IOException
testExchangeCreate
public void testExchangeCreate()
throws JMSException,
IOException
- Description:
When an exchange is created an EXH-1001 message is logged. This will be the first message from this exchange.
Input:
1. Running broker
2. Client requests an exchange be created.
Output:
EXH-1001 : Create : Type: Name:
Validation Steps:
3. The EXH ID is correct
- Throws:
JMSException
IOException
testExchangeDelete
public void testExchangeDelete()
throws Exception,
IOException
- Description:
An Exchange can be deleted through an AMQP ExchangeDelete method. When this is successful an EXH-1002 Delete message will be logged. This will be the last message from this exchange.
Input:
1. Running broker
2. A new Exchange has been created
3. Client requests that the new exchange be deleted.
Output:
EXH-1002 : Deleted
Validation Steps:
4. The EXH ID is correct
5. There is a corresponding EXH-1001 Create message logged.
- Throws:
Exception
IOException
Licensed to the Apache Software Foundation