summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-02-21 21:04:43 +0000
committerRafael H. Schloming <rhs@apache.org>2008-02-21 21:04:43 +0000
commit313ac7bf57e62ebc0fd0ef1012617b61fb4a952b (patch)
tree210e837e1b0878639a1526f1bc70a4897af97472 /java
parent07474f46b3315717e96a654513735ff6f5b1d664 (diff)
downloadqpid-python-313ac7bf57e62ebc0fd0ef1012617b61fb4a952b.tar.gz
combined test cases and eliminated race condition
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@629991 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java b/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java
index 55d53ebaae..0c5c69c1f1 100644
--- a/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java
+++ b/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");
- }
- }
-
}