diff options
Diffstat (limited to 'cpp/test/Ice/retry')
-rw-r--r-- | cpp/test/Ice/retry/AllTests.cpp | 46 | ||||
-rw-r--r-- | cpp/test/Ice/retry/Client.cpp | 44 | ||||
-rw-r--r-- | cpp/test/Ice/retry/Server.cpp | 26 | ||||
-rw-r--r-- | cpp/test/Ice/retry/TestI.cpp | 2 |
4 files changed, 59 insertions, 59 deletions
diff --git a/cpp/test/Ice/retry/AllTests.cpp b/cpp/test/Ice/retry/AllTests.cpp index 9e9c9f353fb..4ebb0915d56 100644 --- a/cpp/test/Ice/retry/AllTests.cpp +++ b/cpp/test/Ice/retry/AllTests.cpp @@ -19,7 +19,7 @@ class CallbackBase : public IceUtil::Monitor<IceUtil::Mutex> public: CallbackBase() : - _called(false) + _called(false) { } @@ -29,26 +29,26 @@ public: bool check() { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - while(!_called) - { - if(!timedWait(IceUtil::Time::seconds(5))) - { - return false; - } - } - _called = false; - return true; + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + while(!_called) + { + if(!timedWait(IceUtil::Time::seconds(5))) + { + return false; + } + } + _called = false; + return true; } protected: void called() { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - assert(!_called); - _called = true; - notify(); + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + assert(!_called); + _called = true; + notify(); } private: @@ -62,12 +62,12 @@ public: virtual void ice_response() { - called(); + called(); } virtual void ice_exception(const ::Ice::Exception&) { - test(false); + test(false); } }; @@ -79,13 +79,13 @@ public: virtual void ice_response() { - test(false); + test(false); } virtual void ice_exception(const ::Ice::Exception& ex) { - test(dynamic_cast<const Ice::ConnectionLostException*>(&ex)); - called(); + test(dynamic_cast<const Ice::ConnectionLostException*>(&ex)); + called(); } }; @@ -118,12 +118,12 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "calling operation to kill connection with second proxy... " << flush; try { - retry2->op(true); - test(false); + retry2->op(true); + test(false); } catch(Ice::ConnectionLostException) { - cout << "ok" << endl; + cout << "ok" << endl; } cout << "calling regular operation with first proxy again... " << flush; diff --git a/cpp/test/Ice/retry/Client.cpp b/cpp/test/Ice/retry/Client.cpp index cd47cb999cc..17cad12407f 100644 --- a/cpp/test/Ice/retry/Client.cpp +++ b/cpp/test/Ice/retry/Client.cpp @@ -31,38 +31,38 @@ main(int argc, char* argv[]) try { - Ice::InitializationData initData; - initData.properties = Ice::createProperties(argc, argv); + Ice::InitializationData initData; + initData.properties = Ice::createProperties(argc, argv); - // - // For this test, we want to disable retries. - // - initData.properties->setProperty("Ice.RetryIntervals", "-1"); + // + // For this test, we want to disable retries. + // + initData.properties->setProperty("Ice.RetryIntervals", "-1"); - // - // This test kills connections, so we don't want warnings. - // - initData.properties->setProperty("Ice.Warn.Connections", "0"); + // + // This test kills connections, so we don't want warnings. + // + initData.properties->setProperty("Ice.Warn.Connections", "0"); - communicator = Ice::initialize(argc, argv, initData); - status = run(argc, argv, communicator); + communicator = Ice::initialize(argc, argv, initData); + status = run(argc, argv, communicator); } catch(const Ice::Exception&) { - status = EXIT_FAILURE; + status = EXIT_FAILURE; } if(communicator) { - try - { - communicator->destroy(); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } + try + { + communicator->destroy(); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } } return status; diff --git a/cpp/test/Ice/retry/Server.cpp b/cpp/test/Ice/retry/Server.cpp index 628bd83a2c2..2fc3aa5d171 100644 --- a/cpp/test/Ice/retry/Server.cpp +++ b/cpp/test/Ice/retry/Server.cpp @@ -32,26 +32,26 @@ main(int argc, char* argv[]) try { - communicator = Ice::initialize(argc, argv); - status = run(argc, argv, communicator); + communicator = Ice::initialize(argc, argv); + status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { - cerr << ex << endl; - status = EXIT_FAILURE; + cerr << ex << endl; + status = EXIT_FAILURE; } if(communicator) { - try - { - communicator->destroy(); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } + try + { + communicator->destroy(); + } + catch(const Ice::Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } } return status; diff --git a/cpp/test/Ice/retry/TestI.cpp b/cpp/test/Ice/retry/TestI.cpp index e8c05542146..3bd0d68364d 100644 --- a/cpp/test/Ice/retry/TestI.cpp +++ b/cpp/test/Ice/retry/TestI.cpp @@ -15,7 +15,7 @@ RetryI::op(bool kill, const Ice::Current& current) { if(kill) { - current.con->close(true); + current.con->close(true); } } |