summaryrefslogtreecommitdiff
path: root/java/common/src/test
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-12-23 21:09:48 +0000
committerRafael H. Schloming <rhs@apache.org>2008-12-23 21:09:48 +0000
commit2769d0a4d12340e68a10dd64f82aa95d6d987c08 (patch)
tree6bea4c612a0542e67465e3892edcbdde6893c1a6 /java/common/src/test
parent12d7d4125a42a7f0ab26a89c3c34e88135cf5869 (diff)
downloadqpid-python-2769d0a4d12340e68a10dd64f82aa95d6d987c08.tar.gz
QPID-1549: don't throw not implemented when we get a flush with the expected bit set
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@729118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/common/src/test')
-rw-r--r--java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java b/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
index 8d3e363fdd..7ce41db4d0 100644
--- a/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
+++ b/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
@@ -36,6 +36,8 @@ import java.util.List;
import java.util.Collections;
import java.io.IOException;
+import static org.apache.qpid.transport.Option.*;
+
/**
* ConnectionTest
*/
@@ -62,7 +64,11 @@ public class ConnectionTest extends TestCase implements SessionListener
protected void tearDown() throws Exception
{
- _ioa.close();
+ if (_ioa != null)
+ {
+ _ioa.close();
+ }
+
super.tearDown();
}
@@ -362,4 +368,18 @@ public class ConnectionTest extends TestCase implements SessionListener
assertEquals("SINK 3", messages.get(0).getBodyString());
}
+ public void testFlushExpected() throws InterruptedException
+ {
+ startServer();
+
+ Connection conn = new Connection();
+ conn.connect("localhost", port, null, "guest", "guest");
+ Session ssn = conn.createSession();
+ ssn.sessionFlush(EXPECTED);
+ send(ssn, "SINK 0");
+ ssn.sessionFlush(EXPECTED);
+ send(ssn, "SINK 1");
+ ssn.sync();
+ }
+
}