diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2007-04-23 16:38:44 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2007-04-23 16:38:44 +0000 |
| commit | 40d10fa929f9dbd431a0fe9cf5634de1d6978c2d (patch) | |
| tree | 7250635ea94ed828aecaefb5045112427b516256 /java/client/src | |
| parent | c65ea55b9cdc9a93522abf013cd0ac18a044163f (diff) | |
| download | qpid-python-40d10fa929f9dbd431a0fe9cf5634de1d6978c2d.tar.gz | |
ResetMessageListenerTest - needs to have IMMEDIATE_PREFETCH = true.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@531527 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
| -rw-r--r-- | java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java b/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java index 42594fff8e..97fbf9876f 100644 --- a/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java +++ b/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java @@ -43,16 +43,13 @@ import org.apache.qpid.client.transport.TransportConnection; import org.apache.qpid.jndi.PropertiesFileInitialContextFactory; /** - * QPID-293 Setting MessageListener after connection has started can cause messages to be "lost" on a internal delivery queue - * <p/> - * The message delivery process: - * Mina puts a message on _queue in AMQSession and the dispatcher thread take()s - * from here and dispatches to the _consumers. If the _consumer1 doesn't have a message listener set at connection start - * then messages are stored on _synchronousQueue (which needs to be > 1 to pass JMS TCK as multiple consumers on a - * session can run in any order and a synchronous put/poll will block the dispatcher). - * <p/> - * When setting the message listener later the _synchronousQueue is just poll()'ed and the first message delivered - * the remaining messages will be left on the queue and lost, subsequent messages on the session will arrive first. + * QPID-293 Setting MessageListener after connection has started can cause messages to be "lost" on a internal delivery + * queue <p/> The message delivery process: Mina puts a message on _queue in AMQSession and the dispatcher thread + * take()s from here and dispatches to the _consumers. If the _consumer1 doesn't have a message listener set at + * connection start then messages are stored on _synchronousQueue (which needs to be > 1 to pass JMS TCK as multiple + * consumers on a session can run in any order and a synchronous put/poll will block the dispatcher). <p/> When setting + * the message listener later the _synchronousQueue is just poll()'ed and the first message delivered the remaining + * messages will be left on the queue and lost, subsequent messages on the session will arrive first. */ public class ResetMessageListenerTest extends TestCase { @@ -78,6 +75,8 @@ public class ResetMessageListenerTest extends TestCase super.setUp(); TransportConnection.createVMBroker(1); + System.setProperty(AMQSession.IMMEDIATE_PREFETCH, "true"); + InitialContextFactory factory = new PropertiesFileInitialContextFactory(); Hashtable<String, String> env = new Hashtable<String, String>(); @@ -203,7 +202,7 @@ public class ResetMessageListenerTest extends TestCase try { - _clientConnection.stop(); + _clientConnection.stop(); } catch (JMSException e) { @@ -226,7 +225,7 @@ public class ResetMessageListenerTest extends TestCase } } }); - + _clientConnection.start(); } catch (javax.jms.IllegalStateException e) |
