org.apache.qpid.server.logging
Class ManagementLoggingTest
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.ManagementLoggingTest
- All Implemented Interfaces:
- junit.framework.Test
public class ManagementLoggingTest
- extends AbstractTestLogging
Management Console Test Suite
The Management Console test suite validates that the follow log messages as specified in the Functional Specification.
This suite of tests validate that the management console messages occur correctly and according to the following format:
MNG-1001 : Startup
MNG-1002 : Starting : : Listening on port
MNG-1003 : Shutting down : : port
MNG-1004 : Ready
MNG-1005 : Stopped
MNG-1006 : Using SSL Keystore :
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 |
testManagementStartupDisabled()
Description:
Verify that when management is disabled in the configuration file the
startup message is not logged. |
void |
testManagementStartupEnabled()
Description:
Using the startup configuration validate that the management startup
message is logged correctly. |
void |
testManagementStartupRMIEntries()
The two MNG-1002 messages are logged at the same time so lets test them
at the same time. |
void |
testManagementStartupSSLKeystore()
Description:
Using the default configuration with SSL enabled for the management port the SSL Keystore path should be reported via MNG-1006
Input:
Management SSL enabled default configuration. |
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 |
ManagementLoggingTest
public ManagementLoggingTest()
setUp
public void setUp()
throws Exception
- Overrides:
setUp
in class AbstractTestLogging
- Throws:
Exception
testManagementStartupEnabled
public void testManagementStartupEnabled()
throws Exception
- Description:
Using the startup configuration validate that the management startup
message is logged correctly.
Input:
Standard configuration with management enabled
Output:
MNG-1001 : Startup
Constraints:
This is the FIRST message logged by MNG
Validation Steps:
1. The BRK ID is correct
2. This is the FIRST message logged by MNG
- Throws:
Exception
testManagementStartupDisabled
public void testManagementStartupDisabled()
throws Exception
- Description:
Verify that when management is disabled in the configuration file the
startup message is not logged.
Input:
Standard configuration with management disabled
Output:
NO MNG messages
Validation Steps:
1. Validate that no MNG messages are produced.
- Throws:
Exception
testManagementStartupRMIEntries
public void testManagementStartupRMIEntries()
throws Exception
- The two MNG-1002 messages are logged at the same time so lets test them
at the same time.
Description:
Using the default configuration validate that the RMI Registry socket is
correctly reported as being opened
Input:
The default configuration file
Output:
MESSAGE MNG-1002 : Starting : RMI Registry : Listening on port 8999
Constraints:
The RMI ConnectorServer and Registry log messages do not have a prescribed order
Validation Steps:
1. The MNG ID is correct
2. The specified port is the correct '8999'
Description:
Using the default configuration validate that the RMI ConnectorServer
socket is correctly reported as being opened
Input:
The default configuration file
Output:
MESSAGE MNG-1002 : Starting : RMI ConnectorServer : Listening on port 9099
Constraints:
The RMI ConnectorServer and Registry log messages do not have a prescribed order
Validation Steps:
1. The MNG ID is correct
2. The specified port is the correct '9099'
- Throws:
Exception
testManagementStartupSSLKeystore
public void testManagementStartupSSLKeystore()
throws Exception
- Description:
Using the default configuration with SSL enabled for the management port the SSL Keystore path should be reported via MNG-1006
Input:
Management SSL enabled default configuration.
Output:
MESSAGE MNG-1006 : Using SSL Keystore : test_resources/ssl/keystore.jks
Validation Steps:
1. The MNG ID is correct
2. The keystore path is as specified in the configuration
- Throws:
Exception
Licensed to the Apache Software Foundation