org.apache.qpid.server.logging
Class BindingLoggingTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.qpid.test.utils.QpidTestCase
              extended by org.apache.qpid.test.utils.QpidBrokerTestCase
                  extended by org.apache.qpid.server.logging.AbstractTestLogging
                      extended by org.apache.qpid.server.logging.BindingLoggingTest
All Implemented Interfaces:
junit.framework.Test

public class BindingLoggingTest
extends AbstractTestLogging

Binding The Binding test suite validates that the follow log messages as specified in the Functional Specification. This suite of tests validate that the Binding messages occur correctly and according to the following format: BND-1001 : Create [: Arguments : ] BND-1002 : Deleted


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase
QpidBrokerTestCase.MessageType
 
Field Summary
(package private)  Connection _connection
           
(package private)  Queue _queue
           
(package private)  Session _session
           
(package private)  Topic _topic
           
(package private) static String BND_PREFIX
           
 
Fields inherited from class org.apache.qpid.server.logging.AbstractTestLogging
_configLoader, _monitor, _serverConfiguration, DEFAULT_LOG_WAIT, TEST_LOG_PREFIX
 
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
 
Constructor Summary
BindingLoggingTest()
           
 
Method Summary
 void setUp()
           
 void testBindingCreate()
          testBindingCreate Description: The binding of a Queue and an Exchange is done via a Binding.
 void testBindingCreateWithArguments()
          Description: A Binding can be made with a set of arguments.
 void testBindingDelete()
          Description: Bindings can be deleted so that a queue can be rebound with a different set of values.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BND_PREFIX

static final String BND_PREFIX
See Also:
Constant Field Values

_connection

Connection _connection

_session

Session _session

_queue

Queue _queue

_topic

Topic _topic
Constructor Detail

BindingLoggingTest

public BindingLoggingTest()
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class AbstractTestLogging
Throws:
Exception

testBindingCreate

public void testBindingCreate()
                       throws JMSException,
                              IOException
testBindingCreate Description: The binding of a Queue and an Exchange is done via a Binding. When this Binding is created a BND-1001 Create message will be logged. Input: 1. Running Broker 2. New Client requests that a Queue is bound to a new exchange. Output: BND-1001 : Create : Arguments : {x-filter-jms-selector=} Validation Steps: 3. The BND ID is correct 4. This will be the first message for the given binding

Throws:
JMSException
IOException

testBindingCreateWithArguments

public void testBindingCreateWithArguments()
                                    throws JMSException,
                                           IOException
Description: A Binding can be made with a set of arguments. When this occurs we logged the key,value pairs as part of the Binding log message. When the subscriber with a JMS Selector consumes from an exclusive queue such as a topic. The binding is made with the JMS Selector as an argument. Input: 1. Running Broker 2. Java Client consumes from a topic with a JMS selector. Output: BND-1001 : Create : Arguments : {x-filter-jms-selector=} Validation Steps: 3. The BND ID is correct 4. The JMS Selector argument is present in the message 5. This will be the first message for the given binding

Throws:
JMSException
IOException

testBindingDelete

public void testBindingDelete()
                       throws JMSException,
                              IOException
Description: Bindings can be deleted so that a queue can be rebound with a different set of values. Input: 1. Running Broker 2. AMQP UnBind Request is made Output: BND-1002 : Deleted Validation Steps: 3. The BND ID is correct 4. There must have been a BND-1001 Create message first. 5. This will be the last message for the given binding

Throws:
JMSException
IOException


Licensed to the Apache Software Foundation