Author: rhs
Date: Thu Feb 21 13:04:43 2008
New Revision: 629991
URL: http://svn.apache.org/viewvc?rev=629991&view=rev
Log:
combined test cases and eliminated race condition
Modified:
incubator/qpid/trunk/qpid/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java
Modified:
incubator/qpid/trunk/qpid/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java?rev=629991&r1=629990&r2=629991&view=diff
==============================================================================
---
incubator/qpid/trunk/qpid/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java
(original)
+++
incubator/qpid/trunk/qpid/java/common/src/test/java/org/apache/qpidity/transport/ConnectionTest.java
Thu Feb 21 13:04:43 2008
@@ -90,9 +90,15 @@
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);
@@ -105,16 +111,6 @@
catch (TransportException e)
{
// expected
- }
- }
-
- public void testClosedNotification() throws Exception
- {
- Condition closed = new Condition();
- Connection conn = connect(closed);
- if (!closed.get(3000))
- {
- fail("never got notified of connection close");
}
}