org.apache.qpid.management.jmx
Class ManagementActorLoggingTest
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.management.jmx.ManagementActorLoggingTest
- All Implemented Interfaces:
- junit.framework.Test
public class ManagementActorLoggingTest
- extends AbstractTestLogging
Test class to test if any change in the broker JMX code is affesting the management console
There are some hardcoding of management feature names and parameter names to create a customized
look in the console.
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, 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 |
ManagementActorLoggingTest
public ManagementActorLoggingTest()
setUp
public void setUp()
throws Exception
- Overrides:
setUp
in class AbstractTestLogging
- Throws:
Exception
tearDown
public void tearDown()
throws Exception
- Overrides:
tearDown
in class AbstractTestLogging
- Throws:
Exception
testJMXManagementConsoleConnection
public void testJMXManagementConsoleConnection()
throws IOException
- Description:
When a JMX Management connection is made then this will be logged out.
Input:
1. Running Broker
2. Connect Management client via JMX
Output:
MNG-1007 : Open
Validation Steps:
1. The MNG ID is correct
2. The user is correct
On connection close a MNG-1008 is expected
* MNG-1008 : Close
Validation Steps:
1. The MNG ID is correct
- Throws:
IOException
- - if there is a problem reseting the log monitor
testConnectionCloseViaManagement
public void testConnectionCloseViaManagement()
throws IOException,
Exception
- Description:
When a connected client has its connection closed via the Management Console this will be logged as a CON-1002 message.
Input:
1. Running Broker
2. Connected Client
3. Connection is closed via Management Console
Output:
CON-1002 : Close
Validation Steps:
4. The CON ID is correct
5. This must be the last CON message for the Connection
6. It must be preceded by a CON-1001 for this Connection
- Throws:
Exception
- - and #getConnection
IOException
- - if there is a problem reseting the log monitor
testCreateExchangeDirectTransientViaManagementConsole
public void testCreateExchangeDirectTransientViaManagementConsole()
throws IOException,
JMException
- Description:
Exchange creation is possible from the Management Console.
When an exchanged is created in this way then a EXH-1001 create message
is expected to be logged.
Input:
1. Running broker
2. Connected Management Console
3. Exchange Created via Management Console
Output:
EXH-1001 : Create : [Durable] Type: Name:
Validation Steps:
4. The EXH ID is correct
5. The correct tags are present in the message based on the create options
- Throws:
IOException
- - if there is a problem reseting the log monitor
JMException
- - and ManagedExchange.deleteQueue
testCreateExchangeTopicTransientViaManagementConsole
public void testCreateExchangeTopicTransientViaManagementConsole()
throws IOException,
JMException
- Throws:
IOException
JMException
testCreateExchangeFanoutTransientViaManagementConsole
public void testCreateExchangeFanoutTransientViaManagementConsole()
throws IOException,
JMException
- Throws:
IOException
JMException
testCreateExchangeHeadersTransientViaManagementConsole
public void testCreateExchangeHeadersTransientViaManagementConsole()
throws IOException,
JMException
- Throws:
IOException
JMException
testCreateQueueTransientViaManagementConsole
public void testCreateQueueTransientViaManagementConsole()
throws IOException,
JMException
- Description:
Queue creation is possible from the Management Console. When a queue is created in this way then a QUE-1001 create message is expected to be logged.
Input:
1. Running broker
2. Connected Management Console
3. Queue Created via Management Console
Output:
QUE-1001 : Create : Transient Owner:
Validation Steps:
4. The QUE ID is correct
5. The correct tags are present in the message based on the create options
- Throws:
IOException
- - if there is a problem reseting the log monitor
JMException
- - and ManagedExchange.deleteQueue
testQueueDeleteViaManagementConsole
public void testQueueDeleteViaManagementConsole()
throws IOException,
JMException
- Description:
The ManagementConsole can be used to delete a queue. When this is done a QUE-1002 Deleted message must be logged.
Input:
1. Running Broker
2. Queue created on the broker with no subscribers
3. Management Console connected
4. Queue is deleted via Management Console
Output:
QUE-1002 : Deleted
Validation Steps:
5. The QUE ID is correct
- Throws:
IOException
- - if there is a problem reseting the log monitor
JMException
- - and ManagedExchange.deleteQueue
testBindingCreateOnDirectViaManagementConsole
public void testBindingCreateOnDirectViaManagementConsole()
throws IOException,
JMException
- Description:
The binding of a Queue and an Exchange is done via a Binding. When this Binding is created via the Management Console a BND-1001 Create message will be logged.
Input:
1. Running Broker
2. Connected Management Console
3. Use Management Console to perform binding
Output:
BND-1001 : Create
Validation Steps:
4. The BND ID is correct
5. This will be the first message for the given binding
- Throws:
IOException
- - if there is a problem reseting the log monitor
JMException
- - and ManagedExchange.createNewBinding
testBindingCreateOnTopicViaManagementConsole
public void testBindingCreateOnTopicViaManagementConsole()
throws IOException,
JMException
- Throws:
IOException
JMException
testBindingCreateOnFanoutViaManagementConsole
public void testBindingCreateOnFanoutViaManagementConsole()
throws IOException,
JMException
- Throws:
IOException
JMException
testUnRegisterExchangeViaManagementConsole
public void testUnRegisterExchangeViaManagementConsole()
throws IOException,
JMException
- Description:
Bindings can be deleted so that a queue can be rebound with a different set of values. This can be performed via the Management Console
Input:
1. Running Broker
2. Management Console connected
3. Management Console is used to perform unbind.
Output:
BND-1002 : Deleted
Validation Steps:
4. The BND ID is correct
5. There must have been a BND-1001 Create message first.
6. This will be the last message for the given binding
- Throws:
IOException
- - if there is a problem reseting the log monitor or an issue with the JMX Connection
JMException
- - and ManagedBroker.unregisterExchange
Licensed to the Apache Software Foundation