org.apache.qpid.test.client.destination
Class AddressBasedDestinationTest

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.test.client.destination.AddressBasedDestinationTest
All Implemented Interfaces:
junit.framework.Test

public class AddressBasedDestinationTest
extends QpidBrokerTestCase


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase
QpidBrokerTestCase.MessageType
 
Field Summary
 
Fields inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase
_broker, _brokerLanguage, _brokerLogPrefix, _brokerOutputStream, _brokerPersistent, _brokers, _configFile, _connectionFactory, _connections, _initialContext, _interleaveBrokerLog, _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
AddressBasedDestinationTest()
           
 
Method Summary
 void setUp()
           
 void tearDown()
           
 void testAddressBasedReplyTo()
          Test goal: Verifies that and address based destination can be used successfully as a reply to.
 void testBindQueueWithArgs()
           
 void testBrowseMode()
          Test Goal : Verify that 'mode : browse' works as expected using a regular consumer.
 void testCapacity()
          Test goal: Verifies the capacity property in address string is handled properly.
 void testCreateExchange()
           
 void testCreateOptions()
           
 void testCreateQueue()
           
 void testDefaultSubjects()
          Test Goal : Verify the default subjects used for each exchange type.
 void testLoadingFromPropertiesFile()
          Test goal: Verifies if the new address format based destinations can be specified and loaded correctly from the properties file.
 void testOverridingSubject()
          Test goal: Verifies the subject can be overridden using "qpid.subject" message property.
 void testSessionCreateQueue()
          Test goal: Verifies that session.createQueue method works as expected both with the new and old addressing scheme.
 void testSessionCreateTopic()
          Test goal: Verifies that session.creatTopic method works as expected both with the new and old addressing scheme.
 void testSourceAndTargetCapacity()
           
 void testSubscriptionForSameDestination()
          Test Goal : When the same destination is used when creating two consumers, If the type == topic, verify that unique subscription queues are created, unless subscription queue has a name.
 void testXBindingsWithoutExchangeName()
           
 void testXSubscribeOverrides()
           
 
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
 

Constructor Detail

AddressBasedDestinationTest

public AddressBasedDestinationTest()
Method Detail

setUp

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

tearDown

public void tearDown()
              throws Exception
Overrides:
tearDown in class QpidBrokerTestCase
Throws:
Exception

testCreateOptions

public void testCreateOptions()
                       throws Exception
Throws:
Exception

testCreateQueue

public void testCreateQueue()
                     throws Exception
Throws:
Exception

testCreateExchange

public void testCreateExchange()
                        throws Exception
Throws:
Exception

testBindQueueWithArgs

public void testBindQueueWithArgs()
                           throws Exception
Throws:
Exception

testCapacity

public void testCapacity()
                  throws Exception
Test goal: Verifies the capacity property in address string is handled properly. Test strategy: Creates a destination with capacity 10. Creates consumer with client ack. Sends 15 messages to the queue, tries to receive 10. Tries to receive the 11th message and checks if its null. Since capacity is 10 and we haven't acked any messages, we should not have received the 11th. Acks the 10th message and verifies we receive the rest of the msgs.

Throws:
Exception

testSourceAndTargetCapacity

public void testSourceAndTargetCapacity()
                                 throws Exception
Throws:
Exception

testLoadingFromPropertiesFile

public void testLoadingFromPropertiesFile()
                                   throws Exception
Test goal: Verifies if the new address format based destinations can be specified and loaded correctly from the properties file.

Throws:
Exception

testOverridingSubject

public void testOverridingSubject()
                           throws Exception
Test goal: Verifies the subject can be overridden using "qpid.subject" message property. Test strategy: Creates and address with a default subject "topic1" Creates a message with "qpid.subject"="topic2" and sends it. Verifies that the message goes to "topic2" instead of "topic1".

Throws:
Exception

testAddressBasedReplyTo

public void testAddressBasedReplyTo()
                             throws Exception
Test goal: Verifies that and address based destination can be used successfully as a reply to.

Throws:
Exception

testSessionCreateQueue

public void testSessionCreateQueue()
                            throws Exception
Test goal: Verifies that session.createQueue method works as expected both with the new and old addressing scheme.

Throws:
Exception

testSessionCreateTopic

public void testSessionCreateTopic()
                            throws Exception
Test goal: Verifies that session.creatTopic method works as expected both with the new and old addressing scheme.

Throws:
Exception

testDefaultSubjects

public void testDefaultSubjects()
                         throws Exception
Test Goal : Verify the default subjects used for each exchange type. The default for amq.topic is "#" and for the rest it's ""

Throws:
Exception

testBrowseMode

public void testBrowseMode()
                    throws Exception
Test Goal : Verify that 'mode : browse' works as expected using a regular consumer. This indirectly tests ring queues as well.

Throws:
Exception

testSubscriptionForSameDestination

public void testSubscriptionForSameDestination()
                                        throws Exception
Test Goal : When the same destination is used when creating two consumers, If the type == topic, verify that unique subscription queues are created, unless subscription queue has a name. If the type == queue, same queue should be shared.

Throws:
Exception

testXBindingsWithoutExchangeName

public void testXBindingsWithoutExchangeName()
                                      throws Exception
Throws:
Exception

testXSubscribeOverrides

public void testXSubscribeOverrides()
                             throws Exception
Throws:
Exception


Licensed to the Apache Software Foundation