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 | 21e65d042a46778a6494b8fb2acf7ac980e25622 (patch) | |
tree | 99977791e873ebacdbc39effd05cc6e644651db2 /java/common/src | |
parent | ba41ff27adbfc9019bbbf9da3bde1beca152ed6d (diff) | |
download | qpid-python-21e65d042a46778a6494b8fb2acf7ac980e25622.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/qpid@979290 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/common/src')
-rw-r--r-- | java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java | 17 |
1 files changed, 9 insertions, 8 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 0ca4a0c659..891ca71b6c 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 @@ -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); } } |