diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-07-05 14:24:02 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-07-05 14:24:02 +0000 |
commit | b088d019ecaf29597f21d96250f11eb8b72b6e98 (patch) | |
tree | cccf79e823d393249a2d85ef4aee93b0a13047fd /cpp/test/Glacier2/sessionControl/Client.cpp | |
parent | fixing standalone IceGridGUI jar (diff) | |
download | ice-b088d019ecaf29597f21d96250f11eb8b72b6e98.tar.bz2 ice-b088d019ecaf29597f21d96250f11eb8b72b6e98.tar.xz ice-b088d019ecaf29597f21d96250f11eb8b72b6e98.zip |
Fixed bug 856
Diffstat (limited to 'cpp/test/Glacier2/sessionControl/Client.cpp')
-rw-r--r-- | cpp/test/Glacier2/sessionControl/Client.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cpp/test/Glacier2/sessionControl/Client.cpp b/cpp/test/Glacier2/sessionControl/Client.cpp index 73d9586bd95..29ed9bf9b36 100644 --- a/cpp/test/Glacier2/sessionControl/Client.cpp +++ b/cpp/test/Glacier2/sessionControl/Client.cpp @@ -54,6 +54,7 @@ SessionControlClient::run(int argc, char* argv[]) cout << "creating session... " << flush; Glacier2::SessionPrx sessionBase = router->createSession("userid", "abc123"); Test::SessionPrx session = Test::SessionPrx::uncheckedCast(sessionBase); + test(session); cout << "ok" << endl; cout << "testing destroy... " << flush; @@ -75,6 +76,25 @@ SessionControlClient::run(int argc, char* argv[]) } cout << "ok" << endl; + cout << "testing create exceptions... " << flush; + try + { + router->createSession("rejectme", "abc123"); + test(false); + } + catch(const Glacier2::CannotCreateSessionException&) + { + } + try + { + router->createSession("localexception", "abc123"); + test(false); + } + catch(const Glacier2::CannotCreateSessionException&) + { + } + cout << "ok" << endl; + cout << "testing shutdown... " << flush; session = Test::SessionPrx::uncheckedCast(router->createSession("userid", "abc123")); session->shutdown(); |