diff options
Diffstat (limited to 'cpp/test/Ice/adapterDeactivation/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/AllTests.cpp | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/cpp/test/Ice/adapterDeactivation/AllTests.cpp b/cpp/test/Ice/adapterDeactivation/AllTests.cpp index 1e701f52db2..b752c39c621 100644 --- a/cpp/test/Ice/adapterDeactivation/AllTests.cpp +++ b/cpp/test/Ice/adapterDeactivation/AllTests.cpp @@ -28,29 +28,38 @@ allTests(const CommunicatorPtr& communicator) test(obj); test(obj == base); cout << "ok" << endl; +#ifdef ICE_OS_WINRT + bool winrt = true; +#else + bool winrt = false; +#endif { - string host = communicator->getProperties()->getPropertyAsIntWithDefault("Ice.IPv6", 0) == 0 ? - "127.0.0.1" : "\"0:0:0:0:0:0:0:1\""; - cout << "creating/destroying/recreating object adapter... " << flush; - ObjectAdapterPtr adapter = - communicator->createObjectAdapterWithEndpoints("TransientTestAdapter", "default -h " + host); - try + if(!winrt || (communicator->getProperties()->getProperty("Ice.Default.Protocol") != "ssl" && + communicator->getProperties()->getProperty("Ice.Default.Protocol") != "wss")) { - communicator->createObjectAdapterWithEndpoints("TransientTestAdapter", "default -h " + host); - test(false); - } - catch(const AlreadyRegisteredException&) - { - } - adapter->destroy(); + string host = communicator->getProperties()->getPropertyAsIntWithDefault("Ice.IPv6", 0) == 0 ? + "127.0.0.1" : "\"0:0:0:0:0:0:0:1\""; + cout << "creating/destroying/recreating object adapter... " << flush; + ObjectAdapterPtr adapter = + communicator->createObjectAdapterWithEndpoints("TransientTestAdapter", "default -h " + host); + try + { + communicator->createObjectAdapterWithEndpoints("TransientTestAdapter", "default -h " + host); + test(false); + } + catch(const AlreadyRegisteredException&) + { + } + adapter->destroy(); - // - // Use a different port than the first adapter to avoid an "address already in use" error. - // - adapter = communicator->createObjectAdapterWithEndpoints("TransientTestAdapter", "default -h " + host); - adapter->destroy(); - cout << "ok" << endl; + // + // Use a different port than the first adapter to avoid an "address already in use" error. + // + adapter = communicator->createObjectAdapterWithEndpoints("TransientTestAdapter", "default -h " + host); + adapter->destroy(); + cout << "ok" << endl; + } } cout << "creating/activating/deactivating object adapter in one operation... " << flush; |