diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-09-15 12:18:41 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-09-15 12:18:41 +0200 |
commit | a4fb9c391caabef6de9cfbd126f4fe10755ece49 (patch) | |
tree | 36dfe5b0a110dddd09f49882649d8c2de825f4b4 /cpp/test/Ice/timeout/Server.cpp | |
parent | Removed Eclipse .launch files (diff) | |
download | ice-a4fb9c391caabef6de9cfbd126f4fe10755ece49.tar.bz2 ice-a4fb9c391caabef6de9cfbd126f4fe10755ece49.tar.xz ice-a4fb9c391caabef6de9cfbd126f4fe10755ece49.zip |
Fixed timeout tests to be less time sensitive
The tests now use a controller to hold/activate the adapter instead of relying
on a timer. Fixes ICE-8312.
Diffstat (limited to 'cpp/test/Ice/timeout/Server.cpp')
-rw-r--r-- | cpp/test/Ice/timeout/Server.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cpp/test/Ice/timeout/Server.cpp b/cpp/test/Ice/timeout/Server.cpp index 8922a336669..64b08e7cf3c 100644 --- a/cpp/test/Ice/timeout/Server.cpp +++ b/cpp/test/Ice/timeout/Server.cpp @@ -19,10 +19,17 @@ int run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); + communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", getTestEndpoint(communicator, 1)); + communicator->getProperties()->setProperty("ControllerAdapter.ThreadPool.Size", "1"); + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - Ice::ObjectPtr object = ICE_MAKE_SHARED(TimeoutI); - adapter->add(object, Ice::stringToIdentity("timeout")); + adapter->add(ICE_MAKE_SHARED(TimeoutI), Ice::stringToIdentity("timeout")); adapter->activate(); + + Ice::ObjectAdapterPtr controllerAdapter = communicator->createObjectAdapter("ControllerAdapter"); + controllerAdapter->add(ICE_MAKE_SHARED(ControllerI, adapter), Ice::stringToIdentity("controller")); + controllerAdapter->activate(); + TEST_READY communicator->waitForShutdown(); return EXIT_SUCCESS; |