You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2007/04/23 18:38:45 UTC
svn commit: r531527 -
/incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java
Author: ritchiem
Date: Mon Apr 23 09:38:44 2007
New Revision: 531527
URL: http://svn.apache.org/viewvc?view=rev&rev=531527
Log:
ResetMessageListenerTest - needs to have IMMEDIATE_PREFETCH = true.
Modified:
incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java
Modified: incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java?view=diff&rev=531527&r1=531526&r2=531527
==============================================================================
--- incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java (original)
+++ incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/client/ResetMessageListenerTest.java Mon Apr 23 09:38:44 2007
@@ -43,16 +43,13 @@
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 @@
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 @@
try
{
- _clientConnection.stop();
+ _clientConnection.stop();
}
catch (JMSException e)
{
@@ -226,7 +225,7 @@
}
}
});
-
+
_clientConnection.start();
}
catch (javax.jms.IllegalStateException e)