summaryrefslogtreecommitdiff
path: root/qpid/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
commit3430d8e2d64d41a5cd51e66eb2d8d263270d04aa (patch)
tree362b401f67fad5fb9fbb8edd1aca0fd2d269325a /qpid/java/common/src/test
parent564775ae717db7743d41f7620cde8845dc7d35b8 (diff)
downloadqpid-python-3430d8e2d64d41a5cd51e66eb2d8d263270d04aa.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@729118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/common/src/test')
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java22
1 files changed, 21 insertions, 1 deletions
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();
+ }
+
}