From 3430d8e2d64d41a5cd51e66eb2d8d263270d04aa Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Tue, 23 Dec 2008 21:09:48 +0000 Subject: 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@729118 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/qpid/transport/ConnectionTest.java | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'qpid/java/common/src/test') diff --git a/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java b/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java index 8d3e363fdd..7ce41db4d0 100644 --- a/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java +++ b/qpid/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(); + } + } -- cgit v1.2.1