summaryrefslogtreecommitdiff
path: root/qpid/java/client/src/test
diff options
context:
space:
mode:
authorAidan Skinner <aidan@apache.org>2008-07-08 09:07:37 +0000
committerAidan Skinner <aidan@apache.org>2008-07-08 09:07:37 +0000
commit949fe96882fe0250b69bd220288f22aa6407fee4 (patch)
treeed7d21f0802b1ebe320d4684216a35f7da93a9ce /qpid/java/client/src/test
parent6e92b10d74de7c8acd9803e6488c13673ceadd40 (diff)
downloadqpid-python-949fe96882fe0250b69bd220288f22aa6407fee4.tar.gz
QPID-293 allow messages which have been received by the consumer before a message listener has been set to be delivered.
BasicMessageConsumer.java: If there are messages on the synchronous queue when a message listener is set, deliver them to it since they can no longer be consumed(). MessageListenerTest.java: Uncomment code that will make the test fail and demonstrate the bug git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@674747 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src/test')
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/client/MessageListenerTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/client/MessageListenerTest.java b/qpid/java/client/src/test/java/org/apache/qpid/client/MessageListenerTest.java
index 12b84b1495..3b7302df62 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/client/MessageListenerTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/client/MessageListenerTest.java
@@ -132,16 +132,16 @@ public class MessageListenerTest extends QpidTestCase implements MessageListener
}
- public void testRecieveTheUseMessageListener() throws Exception
+ public void testRecieveThenUseMessageListener() throws Exception
{
_logger.error("Test disabled as initial receive is not called first");
// Perform initial receive to start connection
- // assertTrue(_consumer.receive(2000) != null);
- // receivedCount++;
+ assertTrue(_consumer.receive(2000) != null);
+ receivedCount++;
// Sleep to ensure remaining 4 msgs end up on _synchronousQueue
- // Thread.sleep(1000);
+ Thread.sleep(1000);
// Set the message listener and wait for the messages to come in.
_consumer.setMessageListener(this);