summaryrefslogtreecommitdiff
path: root/qpid/java/client/src/test
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2007-10-14 02:21:59 +0000
committerRafael H. Schloming <rhs@apache.org>2007-10-14 02:21:59 +0000
commite0ba5becd0052cabe0cfa997dd35d7362bf2c472 (patch)
tree5c55f1dd6be53c4032be45ba422dacca1ded197f /qpid/java/client/src/test
parent2a10deef36eec1b8df9ec52dfb44a72eee7059a8 (diff)
downloadqpid-python-e0ba5becd0052cabe0cfa997dd35d7362bf2c472.tar.gz
Enabled packed struct encoding in python, cpp, and java. Also fixed computation of required byte credit in Message.cpp.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@584474 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/MessageListenerMultiConsumerTest.java8
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java10
2 files changed, 13 insertions, 5 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/client/MessageListenerMultiConsumerTest.java b/qpid/java/client/src/test/java/org/apache/qpid/client/MessageListenerMultiConsumerTest.java
index 98c893eddd..75e50ee09b 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/client/MessageListenerMultiConsumerTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/client/MessageListenerMultiConsumerTest.java
@@ -203,12 +203,12 @@ public class MessageListenerMultiConsumerTest extends QpidTestCase
for (int msg = 0; msg < (MSG_COUNT / 2); msg++)
{
- assertTrue(_consumer1.receive() != null);
+ assertTrue(_consumer1.receive(3000) != null);
}
for (int msg = 0; msg < (MSG_COUNT / 2); msg++)
{
- assertTrue(consumer2.receive() != null);
+ assertTrue(consumer2.receive(3000) != null);
}
}
else
@@ -218,12 +218,12 @@ public class MessageListenerMultiConsumerTest extends QpidTestCase
for (int msg = 0; msg < (MSG_COUNT / 2); msg++)
{
- assertTrue(_consumer1.receive() != null);
+ assertTrue(_consumer1.receive(3000) != null);
}
for (int msg = 0; msg < (MSG_COUNT / 2); msg++)
{
- assertTrue(_consumer2.receive() != null);
+ assertTrue(_consumer2.receive(3000) != null);
}
}
}
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java
index b151aea8ae..c2524c366c 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java
@@ -199,19 +199,27 @@ public class ChannelCloseOkTest extends QpidTestCase
private void waitFor(List<Message> received, int count) throws InterruptedException
{
+ long timeout = 3000;
+
synchronized (received)
{
+ long start = System.currentTimeMillis();
while (received.size() < count)
{
+ if (System.currentTimeMillis() - start > timeout)
+ {
+ fail("timeout expired waiting for messages");
+ }
try
{
- received.wait();
+ received.wait(timeout);
}
catch (InterruptedException e)
{
_log.info("Interrupted: " + e);
throw e;
}
+
}
}
}