summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/dispatcher/Client.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-06-27 12:00:47 +0200
committerBenoit Foucher <benoit@zeroc.com>2018-06-27 12:00:47 +0200
commit7f31702542ce79eaa73489a2f3e0f24653609e78 (patch)
treef9c1fca7259561e8e8a2e7db2c71582125d1a77e /cpp/test/Ice/dispatcher/Client.cpp
parentFix UWP test project dependencies (diff)
downloadice-7f31702542ce79eaa73489a2f3e0f24653609e78.tar.bz2
ice-7f31702542ce79eaa73489a2f3e0f24653609e78.tar.xz
ice-7f31702542ce79eaa73489a2f3e0f24653609e78.zip
Fixed dispatcher test hang (fixes #123)
Diffstat (limited to 'cpp/test/Ice/dispatcher/Client.cpp')
-rw-r--r--cpp/test/Ice/dispatcher/Client.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/cpp/test/Ice/dispatcher/Client.cpp b/cpp/test/Ice/dispatcher/Client.cpp
index 6767b901b9f..79515af000b 100644
--- a/cpp/test/Ice/dispatcher/Client.cpp
+++ b/cpp/test/Ice/dispatcher/Client.cpp
@@ -41,11 +41,13 @@ Client::run(int argc, char** argv)
#else
initData.dispatcher = new Dispatcher();
#endif
- Ice::CommunicatorHolder communicator = initialize(argc, argv, initData);
-
- void allTests(Test::TestHelper*);
- allTests(this);
+ // The communicator must be destroyed before the dispatcher is terminated.
+ {
+ Ice::CommunicatorHolder communicator = initialize(argc, argv, initData);
+ void allTests(Test::TestHelper*);
+ allTests(this);
+ }
Dispatcher::terminate();
}