diff options
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(); |