org.apache.qpid.test.unit.client
Class AMQConnectionTest

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.unit.client.AMQConnectionTest
All Implemented Interfaces:
junit.framework.Test

public class AMQConnectionTest
extends QpidBrokerTestCase


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase
QpidBrokerTestCase.MessageType
 
Field Summary
protected static org.slf4j.Logger _logger
           
 
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
AMQConnectionTest()
           
 
Method Summary
protected  void setUp()
           
static junit.framework.Test suite()
           
protected  void tearDown()
           
 void testCreateQueueSession()
          Simple tests to check we can create TopicSession and QueueSession ok And that they throw exceptions where appropriate as per JMS spec
 void testCreateTopicSession()
           
 void testGetChannelID()
           
 void testHeartBeat()
          Test Strategy : Kill -STOP the broker and see if the client terminates the connection with a read timeout.
 void testPrefetchSystemProperty()
           
 void testQueueSessionCreateTemporaryTopic()
           
 void testQueueSessionCreateTopic()
           
 void testQueueSessionDurableSubscriber()
           
 void testQueueSessionUnsubscribe()
           
 void testTopicSessionCreateBrowser()
           
 void testTopicSessionCreateQueue()
           
 void testTopicSessionCreateTemporaryQueue()
           
 
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

_logger

protected static final org.slf4j.Logger _logger
Constructor Detail

AMQConnectionTest

public AMQConnectionTest()
Method Detail

setUp

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

tearDown

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

testCreateQueueSession

public void testCreateQueueSession()
                            throws JMSException
Simple tests to check we can create TopicSession and QueueSession ok And that they throw exceptions where appropriate as per JMS spec

Throws:
JMSException

testCreateTopicSession

public void testCreateTopicSession()
                            throws JMSException
Throws:
JMSException

testTopicSessionCreateBrowser

public void testTopicSessionCreateBrowser()
                                   throws JMSException
Throws:
JMSException

testTopicSessionCreateQueue

public void testTopicSessionCreateQueue()
                                 throws JMSException
Throws:
JMSException

testTopicSessionCreateTemporaryQueue

public void testTopicSessionCreateTemporaryQueue()
                                          throws JMSException
Throws:
JMSException

testQueueSessionCreateTemporaryTopic

public void testQueueSessionCreateTemporaryTopic()
                                          throws JMSException
Throws:
JMSException

testQueueSessionCreateTopic

public void testQueueSessionCreateTopic()
                                 throws JMSException
Throws:
JMSException

testQueueSessionDurableSubscriber

public void testQueueSessionDurableSubscriber()
                                       throws JMSException
Throws:
JMSException

testQueueSessionUnsubscribe

public void testQueueSessionUnsubscribe()
                                 throws JMSException
Throws:
JMSException

testPrefetchSystemProperty

public void testPrefetchSystemProperty()
                                throws Exception
Throws:
Exception

testGetChannelID

public void testGetChannelID()

testHeartBeat

public void testHeartBeat()
                   throws Exception
Test Strategy : Kill -STOP the broker and see if the client terminates the connection with a read timeout. The broker process is cleaned up in the test itself and avoids using process.waitFor() as it hangs.

Throws:
Exception

suite

public static junit.framework.Test suite()


Licensed to the Apache Software Foundation