diff options
author | Gordon Sim <gsim@apache.org> | 2010-07-01 16:49:22 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2010-07-01 16:49:22 +0000 |
commit | c54cd19d2d5b1e8ab5cc36ca7e1b1068b6ff7be2 (patch) | |
tree | 3f40bfadaed5cf72937b6a37ce63af9e66f549ca /cpp/src/tests | |
parent | 21383bd52d2b2762dc4c0d09b52465cfa3856de4 (diff) | |
download | qpid-python-c54cd19d2d5b1e8ab5cc36ca7e1b1068b6ff7be2.tar.gz |
QPID-664: Translate exceptions to correct type when occuring on creating new session.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@959721 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rw-r--r-- | cpp/src/tests/MessagingSessionTests.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/tests/MessagingSessionTests.cpp b/cpp/src/tests/MessagingSessionTests.cpp index ce1d885e46..a23e8c3a9e 100644 --- a/cpp/src/tests/MessagingSessionTests.cpp +++ b/cpp/src/tests/MessagingSessionTests.cpp @@ -775,6 +775,14 @@ QPID_AUTO_TEST_CASE(testAuthenticatedUsername) BOOST_CHECK_EQUAL(fix.connection.getAuthenticatedUsername(), std::string("anonymous")); } +QPID_AUTO_TEST_CASE(testExceptionOnClosedConnection) +{ + MessagingFixture fix; + fix.connection.close(); + BOOST_CHECK_THROW(fix.connection.createSession(), MessagingException); + Connection connection("blah"); + BOOST_CHECK_THROW(connection.createSession(), MessagingException); +} QPID_AUTO_TEST_SUITE_END() |