diff options
author | Andrew Donald Kennedy <grkvlt@apache.org> | 2010-07-26 14:08:45 +0000 |
---|---|---|
committer | Andrew Donald Kennedy <grkvlt@apache.org> | 2010-07-26 14:08:45 +0000 |
commit | edf2f72240e24f23ee9c528190584cfa9b21022d (patch) | |
tree | 7d02722faac824c6c9847f574a2da4bfa9744e72 /qpid/java/common/src/test/java/org | |
parent | c7119d95ee6650053350c15af138ca8d60f3c33c (diff) | |
download | qpid-python-edf2f72240e24f23ee9c528190584cfa9b21022d.tar.gz |
QPID-2760: Only client 0-10 session sync should throw any exceptions
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@979290 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/common/src/test/java/org')
-rw-r--r-- | qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java | 17 |
1 files changed, 9 insertions, 8 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 0ca4a0c659..891ca71b6c 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 @@ -425,6 +425,10 @@ public class ConnectionTest extends TestCase implements SessionListener } } + /** + * The 0-10 {@code executionSync} command should set the exception status in the session, + * so that the client session object can then throw it as an {@link AMQException}. + */ public void testExecutionExceptionSync() throws Exception { startServer(); @@ -433,14 +437,11 @@ public class ConnectionTest extends TestCase implements SessionListener conn.connect("localhost", port, null, "guest", "guest"); Session ssn = conn.createSession(); send(ssn, "EXCP 0", true); - try - { - ssn.sync(); - } - catch (SessionException exc) - { - assertNotNull(exc.getException()); - } + ExecutionException before = ssn.getException(); + assertNull("There should not be an exception stored in the session", before); + ssn.sync(); + ExecutionException after = ssn.getException(); + assertNotNull("There should be an exception stored in the session", after); } } |