diff options
Diffstat (limited to 'cpp/test/Ice/location/ServerLocator.cpp')
-rw-r--r-- | cpp/test/Ice/location/ServerLocator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/test/Ice/location/ServerLocator.cpp b/cpp/test/Ice/location/ServerLocator.cpp index 3221166c1e5..9e84191ccd4 100644 --- a/cpp/test/Ice/location/ServerLocator.cpp +++ b/cpp/test/Ice/location/ServerLocator.cpp @@ -106,6 +106,9 @@ ServerLocator::findObjectById_async(const Ice::AMD_Locator_findObjectByIdPtr& re const Ice::Current& current) const { ++const_cast<int&>(_requestCount); + // We add a small delay to make sure locator request queuing gets tested when + // running the test on a fast machine + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1)); response->ice_response(_registry->getObject(id)); } @@ -114,6 +117,9 @@ ServerLocator::findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& const Ice::Current& current) const { ++const_cast<int&>(_requestCount); + // We add a small delay to make sure locator request queuing gets tested when + // running the test on a fast machine + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1)); response->ice_response(_registry->getAdapter(id)); } |