|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.qpid.test.utils.QpidTestCase
org.apache.qpid.test.utils.QpidBrokerTestCase
org.apache.qpid.server.queue.DeepQueueConsumeWithSelector
public class DeepQueueConsumeWithSelector
Test DeapQueueConsumerWithSelector Summary: Prior to M4 the broker had a different queue model which pre-processed the messages on the queue for any connecting subscription that had a selector. If the queue had a lot of data then this may take a long time to process to such an extent that the subscription creation may time out. During this pre-process phase the virtualhost would be come unresposive. Our solution was to allow the timeout to be adjusted QPID-1119, which allowed the subscription to connect but did not address the unresponsiveness. The new queue model introduced in M4 resolved this. This test is to validate that the new queueing model does indeed remove the long pre-processing phase and allow immediate subscription so that there is no unresponsive period. Test Strategy: Add 100k messages to the queue with a numberic header property that will allow later subscribers to use as in a selector. Connect the subscriber and time how long it takes to connect. Finally consume all the messages from the queue to clean up.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
---|
QpidBrokerTestCase.MessageType |
Field Summary | |
---|---|
protected long |
SYNC_WRITE_TIMEOUT
|
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 | |
---|---|
DeepQueueConsumeWithSelector()
|
Method Summary | |
---|---|
Message |
createNextMessage(Session session,
int msgCount)
|
void |
onMessage(Message message)
|
void |
setUp()
|
void |
test()
|
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 |
---|
protected long SYNC_WRITE_TIMEOUT
Constructor Detail |
---|
public DeepQueueConsumeWithSelector()
Method Detail |
---|
public void setUp() throws Exception
setUp
in class QpidBrokerTestCase
Exception
public void test() throws Exception
Exception
public Message createNextMessage(Session session, int msgCount) throws JMSException
createNextMessage
in class QpidBrokerTestCase
JMSException
public void onMessage(Message message)
onMessage
in interface MessageListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |