diff options
| author | Stephen Vinoski <vinoski@apache.org> | 2006-11-23 02:54:50 +0000 |
|---|---|---|
| committer | Stephen Vinoski <vinoski@apache.org> | 2006-11-23 02:54:50 +0000 |
| commit | b0b2a57ba3c3db54a8d21d374b3e5d783a93ed17 (patch) | |
| tree | f50425eeab1b1b9848855d86c1770ececf334f83 /qpid/java | |
| parent | 811cfd3e64d36f0e3c4ebac71bf7bdecca8cdd83 (diff) | |
| download | qpid-python-b0b2a57ba3c3db54a8d21d374b3e5d783a93ed17.tar.gz | |
speed up test
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@478444 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java index 53e08acbab..16ac8596c3 100644 --- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java +++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java @@ -31,9 +31,6 @@ import javax.jms.*; import junit.framework.TestCase; -/** - * This is a slow test. - */ public class MultipleConnectionTest extends TestCase { public static final String _defaultBroker = "vm://:1"; @@ -118,13 +115,15 @@ public class MultipleConnectionTest extends TestCase synchronized boolean waitUntil(int expected, long maxWait) throws InterruptedException { long start = System.currentTimeMillis(); - long timeLeft = maxWait; - do + while (expected > _count) { + long timeLeft = maxWait - timeSince(start); + if (timeLeft < 0) + { + break; + } wait(timeLeft); - timeLeft = maxWait - timeSince(start); } - while (expected > _count && timeLeft > 0); return expected <= _count; } |
