diff options
author | Marc Laukien <marc@zeroc.com> | 2002-09-19 20:26:15 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-09-19 20:26:15 +0000 |
commit | fa1d5c95995b0eece64b5da943e0ee5ad1aaad72 (patch) | |
tree | abfc98d4c9e9074f0c20118215c800cae13e26f7 /cpp | |
parent | Fixed thread pool property (diff) | |
download | ice-fa1d5c95995b0eece64b5da943e0ee5ad1aaad72.tar.bz2 ice-fa1d5c95995b0eece64b5da943e0ee5ad1aaad72.tar.xz ice-fa1d5c95995b0eece64b5da943e0ee5ad1aaad72.zip |
exception handling fixes
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/config/TestUtil.py | 4 | ||||
-rw-r--r-- | cpp/test/Ice/faultTolerance/AllTests.cpp | 14 | ||||
-rwxr-xr-x | cpp/test/Ice/faultTolerance/run.py | 2 | ||||
-rw-r--r-- | cpp/test/Ice/location/AllTests.cpp | 8 | ||||
-rw-r--r-- | cpp/test/Ice/locationForward/AllTests.cpp | 8 | ||||
-rw-r--r-- | cpp/test/Ice/operations/Client.cpp | 4 |
6 files changed, 24 insertions, 16 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py index 9519e2c437e..ca000a7230a 100644 --- a/cpp/config/TestUtil.py +++ b/cpp/config/TestUtil.py @@ -16,8 +16,8 @@ import sys, os # protocol. Otherwise TCP is used. # -protocol = "ssl" -#protocol = "" +#protocol = "ssl" +protocol = "" # # Set compressed to 1 in case you want to run the tests with diff --git a/cpp/test/Ice/faultTolerance/AllTests.cpp b/cpp/test/Ice/faultTolerance/AllTests.cpp index 7671910430b..0dfbca787f2 100644 --- a/cpp/test/Ice/faultTolerance/AllTests.cpp +++ b/cpp/test/Ice/faultTolerance/AllTests.cpp @@ -57,7 +57,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports) obj->abort(); test(false); } - catch(const Ice::SocketException&) + catch(const Ice::ConnectionLostException&) { cout << "ok" << endl; } @@ -70,7 +70,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports) obj->idempotentAbort(); test(false); } - catch(const Ice::SocketException&) + catch(const Ice::ConnectionLostException&) { cout << "ok" << endl; } @@ -84,7 +84,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports) obj->nonmutatingAbort(); test(false); } - catch(const Ice::SocketException&) + catch(const Ice::ConnectionLostException&) { cout << "ok" << endl; } @@ -102,8 +102,12 @@ allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports) obj->ice_ping(); test(false); } - catch(const Ice::SocketException&) + catch(const Ice::CloseConnectionException&) { cout << "ok" << endl; - } + } + catch(const Ice::ConnectFailedException&) + { + cout << "ok" << endl; + } } diff --git a/cpp/test/Ice/faultTolerance/run.py b/cpp/test/Ice/faultTolerance/run.py index a190afab3b9..0517a502f16 100755 --- a/cpp/test/Ice/faultTolerance/run.py +++ b/cpp/test/Ice/faultTolerance/run.py @@ -25,7 +25,7 @@ testdir = os.path.join(toplevel,"test", "Ice", "faultTolerance") server = os.path.join(testdir, "server") client = os.path.join(testdir, "client") -num = 10 +num = 6 base = 12340 updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel) diff --git a/cpp/test/Ice/location/AllTests.cpp b/cpp/test/Ice/location/AllTests.cpp index 62cba6a87eb..7750464c58a 100644 --- a/cpp/test/Ice/location/AllTests.cpp +++ b/cpp/test/Ice/location/AllTests.cpp @@ -62,7 +62,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref) { obj2->ice_ping(); } - catch(const Ice::SocketException&) + catch(const Ice::LocalException&) { test(false); } @@ -95,7 +95,11 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref) obj2->ice_ping(); test(false); } - catch(const Ice::SocketException&) + catch(const Ice::CloseConnectionException&) + { + cout << "ok" << endl; + } + catch(const Ice::ConnectFailedException&) { cout << "ok" << endl; } diff --git a/cpp/test/Ice/locationForward/AllTests.cpp b/cpp/test/Ice/locationForward/AllTests.cpp index 9da70ed4393..047f225b5da 100644 --- a/cpp/test/Ice/locationForward/AllTests.cpp +++ b/cpp/test/Ice/locationForward/AllTests.cpp @@ -47,8 +47,12 @@ allTests(const Ice::CommunicatorPtr& communicator, int port, int lastPort) lastObj->ice_ping(); test(false); } - catch(const Ice::SocketException&) + catch(const Ice::CloseConnectionException&) { cout << "ok" << endl; - } + } + catch(const Ice::ConnectFailedException&) + { + cout << "ok" << endl; + } } diff --git a/cpp/test/Ice/operations/Client.cpp b/cpp/test/Ice/operations/Client.cpp index 78ae8503934..bf7aca3e676 100644 --- a/cpp/test/Ice/operations/Client.cpp +++ b/cpp/test/Ice/operations/Client.cpp @@ -35,10 +35,6 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { cout << "ok" << endl; } - catch(const Ice::ConnectionLostException&) // For Java compatibility - { - cout << "ok" << endl; - } return EXIT_SUCCESS; } |