diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2008-02-21 21:04:43 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2008-02-21 21:04:43 +0000 |
| commit | 9ed1e557f0cf1f16d5f2699cbe8e9d5003c6c11a (patch) | |
| tree | 9b5cd35fe1da61bb7c219484e4aef30ad2097fb2 /qpid/java | |
| parent | 7e83529e9cef60441fa9cd297ffce485e57b3fc2 (diff) | |
| download | qpid-python-9ed1e557f0cf1f16d5f2699cbe8e9d5003c6c11a.tar.gz | |
combined test cases and eliminated race condition
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@629991 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/qpid/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java b/qpid/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java index 55d53ebaae..0c5c69c1f1 100644 --- a/qpid/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java +++ b/qpid/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java @@ -90,9 +90,15 @@ public class ConnectionTest extends TestCase return conn; } - public void testWriteToClosed() throws Exception + public void testClosedNotificationAndWriteToClosed() throws Exception { - Connection conn = connect(null); + Condition closed = new Condition(); + Connection conn = connect(closed); + if (!closed.get(3000)) + { + fail("never got notified of connection close"); + } + Channel ch = conn.getChannel(0); Session ssn = new Session(); ssn.attach(ch); @@ -108,14 +114,4 @@ public class ConnectionTest extends TestCase } } - public void testClosedNotification() throws Exception - { - Condition closed = new Condition(); - Connection conn = connect(closed); - if (!closed.get(3000)) - { - fail("never got notified of connection close"); - } - } - } |
