From 313ac7bf57e62ebc0fd0ef1012617b61fb4a952b Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Thu, 21 Feb 2008 21:04:43 +0000 Subject: 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 --- .../org/apache/qpidity/transport/ConnectionTest.java | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'java/common/src') 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"); - } - } - } -- cgit v1.2.1