org.apache.qpid.server.queue
Class ModelTest

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.queue.ModelTest
All Implemented Interfaces:
junit.framework.Test

public class ModelTest
extends QpidBrokerTestCase

This Test validates the Queue Model on the broker. Currently it has some basic queue creation / deletion tests. However, it should be expanded to include other tests that relate to the model. i.e. The Create and Delete tests should ensure that the requisite logging is performed. Additions to this suite would be to complete testing of creations, validating fields such as owner/exclusive, autodelete and priority are correctly set. Currently this test uses the JMX interface to validate that the queue has been declared as expected so these tests cannot run against a CPP broker. Tests should ensure that they clean up after themselves. e,g. Durable queue creation test should perform a queue delete.


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, _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
ModelTest()
           
 
Method Summary
 void setUp()
           
 void tearDown()
           
 void testCreationDurableViaJMX()
          Test that a durable queue can be created via JMX.
 void testCreationTransientViaJMX()
          Test that a transient queue can be created via JMX.
 void testDeletionDurableViaJMX()
          Test that a durable queue can be created via JMX.
 void testDeletionTransientViaJMX()
          Test that a transient queue can be deleted via JMX.
 void testExclusiveQueueCreationDurableViaAMQP()
          Test that a durable exclusive queue can be created via AMQP.
 void testExclusiveQueueCreationTransientViaAMQP()
          Test that an exclusive transient queue can be created via AMQP.
 void testQueueCreationDurableViaAMQP()
          Test that a durable queue can be created via AMQP.
 void testQueueCreationTransientViaAMQP()
          Test that a transient queue can be created via AMQP.
 
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

ModelTest

public ModelTest()
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

testExclusiveQueueCreationTransientViaAMQP

public void testExclusiveQueueCreationTransientViaAMQP()
                                                throws Exception
Test that an exclusive transient queue can be created via AMQP.

Throws:
Exception - On unexpected error

testQueueCreationTransientViaAMQP

public void testQueueCreationTransientViaAMQP()
                                       throws Exception
Test that a transient queue can be created via AMQP.

Throws:
Exception - On unexpected error

testExclusiveQueueCreationDurableViaAMQP

public void testExclusiveQueueCreationDurableViaAMQP()
                                              throws Exception
Test that a durable exclusive queue can be created via AMQP.

Throws:
Exception - On unexpected error

testQueueCreationDurableViaAMQP

public void testQueueCreationDurableViaAMQP()
                                     throws Exception
Test that a durable queue can be created via AMQP.

Throws:
Exception - On unexpected error

testCreationTransientViaJMX

public void testCreationTransientViaJMX()
                                 throws IOException,
                                        JMException
Test that a transient queue can be created via JMX.

Throws:
IOException - if there is a problem via the JMX connection
JMException - if there is a problem with the JMX command

testCreationDurableViaJMX

public void testCreationDurableViaJMX()
                               throws IOException,
                                      JMException
Test that a durable queue can be created via JMX.

Throws:
IOException - if there is a problem via the JMX connection
JMException - if there is a problem with the JMX command

testDeletionTransientViaJMX

public void testDeletionTransientViaJMX()
                                 throws IOException,
                                        JMException
Test that a transient queue can be deleted via JMX.

Throws:
IOException - if there is a problem via the JMX connection
JMException - if there is a problem with the JMX command

testDeletionDurableViaJMX

public void testDeletionDurableViaJMX()
                               throws IOException,
                                      JMException
Test that a durable queue can be created via JMX.

Throws:
IOException - if there is a problem via the JMX connection
JMException - if there is a problem with the JMX command


Licensed to the Apache Software Foundation