org.apache.qpid.server.queue
Class QueueDepthWithSelectorTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.qpid.test.utils.QpidTestCase
org.apache.qpid.server.util.InternalBrokerBaseCase
org.apache.qpid.server.queue.QueueDepthWithSelectorTest
- All Implemented Interfaces:
- junit.framework.Test
public class QueueDepthWithSelectorTest
- extends org.apache.qpid.server.util.InternalBrokerBaseCase
Test Case to ensure that messages are correctly returned.
This includes checking:
- The message is returned.
- The broker doesn't leak memory.
- The broker's state is correct after test.
Why is this hardcoded to InVM testing, should be converted to QTC.
Fields inherited from class org.apache.qpid.test.utils.QpidTestCase |
MEMORY_STORE_CLASS_NAME, MS_CLASS_NAME_KEY |
Methods inherited from class org.apache.qpid.server.util.InternalBrokerBaseCase |
acknowledge, browse, checkStoreContents, configure, createBroker, getChannel, getConfiguration, getConfigXml, getMessageStore, getQUEUE_NAME, getQueue, getRegistry, getSession, getVirtualHost, isStarted, publishMessages, setChannel, setConfiguration, setConfigXml, setMessageStore, setQUEUE_NAME, setQueue, setRegistry, setSession, setStarted, setVirtualHost, stopBroker, subscribe |
Methods inherited from class org.apache.qpid.test.utils.QpidTestCase |
getTestProfileMessageStoreClassName, run |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, runBare, 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 |
_logger
protected static final org.apache.log4j.Logger _logger
BROKER
protected final String BROKER
- See Also:
- Constant Field Values
VHOST
protected final String VHOST
- See Also:
- Constant Field Values
QUEUE
protected final String QUEUE
_context
protected Context _context
_clientConnection
protected Connection _clientConnection
_producerConnection
protected Connection _producerConnection
_producerSession
protected Session _producerSession
_producer
protected MessageProducer _producer
MSG_COUNT
protected static int MSG_COUNT
_messages
protected Message[] _messages
_queue
protected Queue _queue
QueueDepthWithSelectorTest
public QueueDepthWithSelectorTest()
setUp
public void setUp()
throws Exception
- Overrides:
setUp
in class org.apache.qpid.server.util.InternalBrokerBaseCase
- Throws:
Exception
tearDown
public void tearDown()
throws Exception
- Overrides:
tearDown
in class org.apache.qpid.server.util.InternalBrokerBaseCase
- Throws:
Exception
test
public void test()
throws Exception
- Throws:
Exception
init
protected void init()
throws NamingException,
JMSException,
org.apache.qpid.AMQException
- Throws:
NamingException
JMSException
org.apache.qpid.AMQException
verifyBrokerState
protected void verifyBrokerState(int expectedDepth)
verifyAllMessagesRecevied
protected void verifyAllMessagesRecevied(int expectedDepth)
throws Exception
- Throws:
Exception
nextMessage
protected Message nextMessage(int msgNo)
throws JMSException
- Get the next message putting the given count into the intProperties as ID.
- Parameters:
msgNo
- the message count to store as ID.
- Returns:
-
- Throws:
JMSException
Licensed to the Apache Software Foundation