diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-04-06 10:21:40 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-04-06 10:21:40 -0230 |
commit | 12935ce276507bd0a4b48f413bb11d737a02c5bc (patch) | |
tree | 2a3f263fb66eba5a34f437f25a909ed5d0eab2ec /cpp/test/Ice/exceptions/AllTests.cpp | |
parent | Bug 3465 - Remove _adapter members from test where unecessary (diff) | |
download | ice-12935ce276507bd0a4b48f413bb11d737a02c5bc.tar.bz2 ice-12935ce276507bd0a4b48f413bb11d737a02c5bc.tar.xz ice-12935ce276507bd0a4b48f413bb11d737a02c5bc.zip |
Bug 3816 - removed timed waits from tests
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/exceptions/AllTests.cpp | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 9c5f64c2eb4..01529522a36 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -47,18 +47,14 @@ public: { } - bool check() + void check() { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); while(!_called) { - if(!timedWait(IceUtil::Time::seconds(5))) - { - return false; - } + wait(); } _called = false; - return true; } protected: @@ -1110,37 +1106,37 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { AMI_Thrower_throwAasAIPtr cb = new AMI_Thrower_throwAasAI; thrower->throwAasA_async(cb, 1); - test(cb->check()); + cb->check(); // Let's check if we can reuse the same callback object for another call. thrower->throwAasA_async(cb, 1); - test(cb->check()); + cb->check(); } { AMI_Thrower_throwAorDasAorDIPtr cb = new AMI_Thrower_throwAorDasAorDI; thrower->throwAorDasAorD_async(cb, 1); - test(cb->check()); + cb->check(); } { AMI_Thrower_throwAorDasAorDIPtr cb = new AMI_Thrower_throwAorDasAorDI; thrower->throwAorDasAorD_async(cb, -1); - test(cb->check()); + cb->check(); } { AMI_Thrower_throwBasBIPtr cb = new AMI_Thrower_throwBasBI; thrower->throwBasB_async(cb, 1, 2); - test(cb->check()); + cb->check(); } { AMI_Thrower_throwCasCIPtr cb = new AMI_Thrower_throwCasCI; thrower->throwCasC_async(cb, 1, 2, 3); - test(cb->check()); + cb->check(); // Let's check if we can reuse the same callback object for another call. thrower->throwCasC_async(cb, 1, 2, 3); - test(cb->check()); + cb->check(); } #if (!defined(_MSC_VER) || _MSC_VER >= 1300) @@ -1150,7 +1146,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { AMI_Thrower_throwModAIPtr cb = new AMI_Thrower_throwModAI; thrower->throwModA_async(cb, 1, 2); - test(cb->check()); + cb->check(); } #endif @@ -1161,19 +1157,19 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { AMI_Thrower_throwBasAIPtr cb = new AMI_Thrower_throwBasAI; thrower->throwBasA_async(cb, 1, 2); - test(cb->check()); + cb->check(); } { AMI_Thrower_throwCasAIPtr cb = new AMI_Thrower_throwCasAI; thrower->throwCasA_async(cb, 1, 2, 3); - test(cb->check()); + cb->check(); } { AMI_Thrower_throwCasBIPtr cb = new AMI_Thrower_throwCasBI; thrower->throwCasB_async(cb, 1, 2, 3); - test(cb->check()); + cb->check(); } cout << "ok" << endl; @@ -1185,19 +1181,19 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { AMI_Thrower_throwUndeclaredAIPtr cb = new AMI_Thrower_throwUndeclaredAI; thrower->throwUndeclaredA_async(cb, 1); - test(cb->check()); + cb->check(); } { AMI_Thrower_throwUndeclaredBIPtr cb = new AMI_Thrower_throwUndeclaredBI; thrower->throwUndeclaredB_async(cb, 1, 2); - test(cb->check()); + cb->check(); } { AMI_Thrower_throwUndeclaredCIPtr cb = new AMI_Thrower_throwUndeclaredCI; thrower->throwUndeclaredC_async(cb, 1, 2, 3); - test(cb->check()); + cb->check(); } cout << "ok" << endl; @@ -1210,7 +1206,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) ThrowerPrx thrower2 = ThrowerPrx::uncheckedCast(thrower->ice_identity(id)); AMI_Thrower_throwAasAObjectNotExistIPtr cb = new AMI_Thrower_throwAasAObjectNotExistI(communicator); thrower2->throwAasA_async(cb, 1); - test(cb->check()); + cb->check(); } cout << "ok" << endl; @@ -1221,7 +1217,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { AMI_Thrower_throwAasAFacetNotExistIPtr cb = new AMI_Thrower_throwAasAFacetNotExistI; thrower2->throwAasA_async(cb, 1); - test(cb->check()); + cb->check(); } cout << "ok" << endl; @@ -1232,7 +1228,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) AMI_WrongOperation_noSuchOperationIPtr cb = new AMI_WrongOperation_noSuchOperationI; WrongOperationPrx thrower4 = WrongOperationPrx::uncheckedCast(thrower); thrower4->noSuchOperation_async(cb); - test(cb->check()); + cb->check(); } cout << "ok" << endl; @@ -1242,7 +1238,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { AMI_Thrower_throwLocalExceptionIPtr cb = new AMI_Thrower_throwLocalExceptionI; thrower->throwLocalException_async(cb); - test(cb->check()); + cb->check(); } cout << "ok" << endl; @@ -1251,7 +1247,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) AMI_Thrower_throwNonIceExceptionIPtr cb = new AMI_Thrower_throwNonIceExceptionI; thrower->throwNonIceException_async(cb); - test(cb->check()); + cb->check(); cout << "ok" << endl; |