diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-02-13 12:35:22 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-02-13 14:15:36 +0100 |
commit | 9358fdee4360f40451641f49fcd38b177f93c4ad (patch) | |
tree | 8ff4ec1deb284d1c4335c9ea3a57c12ee4c2953d /cpp/test | |
parent | Fix building PHP with Windows C++ NuGet packages (diff) | |
download | ice-9358fdee4360f40451641f49fcd38b177f93c4ad.tar.bz2 ice-9358fdee4360f40451641f49fcd38b177f93c4ad.tar.xz ice-9358fdee4360f40451641f49fcd38b177f93c4ad.zip |
Fixed UWP cross operation test failure
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/Ice/operations/BatchOneways.cpp | 11 | ||||
-rw-r--r-- | cpp/test/Ice/operations/Test.ice | 2 | ||||
-rw-r--r-- | cpp/test/Ice/operations/TestAMD.ice | 2 | ||||
-rw-r--r-- | cpp/test/Ice/operations/TestAMDI.cpp | 22 | ||||
-rw-r--r-- | cpp/test/Ice/operations/TestAMDI.h | 7 | ||||
-rw-r--r-- | cpp/test/Ice/operations/TestI.cpp | 10 | ||||
-rw-r--r-- | cpp/test/Ice/operations/TestI.h | 2 | ||||
-rw-r--r-- | cpp/test/ios/controller/Bundle/ControllerI.mm | 3 |
8 files changed, 57 insertions, 2 deletions
diff --git a/cpp/test/Ice/operations/BatchOneways.cpp b/cpp/test/Ice/operations/BatchOneways.cpp index 38cdca817de..0854573df38 100644 --- a/cpp/test/Ice/operations/BatchOneways.cpp +++ b/cpp/test/Ice/operations/BatchOneways.cpp @@ -199,7 +199,16 @@ batchOneways(const Test::MyClassPrxPtr& p) ic->destroy(); } - if(batch->ice_getConnection() && + bool supportsCompress = true; + try + { + supportsCompress = p->supportsCompress(); + } + catch(const Ice::OperationNotExistException&) + { + } + + if(supportsCompress && batch->ice_getConnection() && p->ice_getCommunicator()->getProperties()->getProperty("Ice.Override.Compress") == "") { Ice::ObjectPrxPtr prx = batch->ice_getConnection()->createProxy(batch->ice_getIdentity())->ice_batchOneway(); diff --git a/cpp/test/Ice/operations/Test.ice b/cpp/test/Ice/operations/Test.ice index d4c6f1c088a..e4e393e858a 100644 --- a/cpp/test/Ice/operations/Test.ice +++ b/cpp/test/Ice/operations/Test.ice @@ -98,6 +98,8 @@ interface MyClass { void shutdown(); + bool supportsCompress(); + void opVoid(); byte opByte(byte p1, byte p2, diff --git a/cpp/test/Ice/operations/TestAMD.ice b/cpp/test/Ice/operations/TestAMD.ice index 60de31074fe..31f8ff044a6 100644 --- a/cpp/test/Ice/operations/TestAMD.ice +++ b/cpp/test/Ice/operations/TestAMD.ice @@ -96,6 +96,8 @@ dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; { void shutdown(); + bool supportsCompress(); + void opVoid(); byte opByte(byte p1, byte p2, diff --git a/cpp/test/Ice/operations/TestAMDI.cpp b/cpp/test/Ice/operations/TestAMDI.cpp index c0ecb21857b..0127f931826 100644 --- a/cpp/test/Ice/operations/TestAMDI.cpp +++ b/cpp/test/Ice/operations/TestAMDI.cpp @@ -99,6 +99,17 @@ MyDerivedClassI::shutdownAsync(function<void()> response, } void +MyDerivedClassI::supportsCompressAsync(std::function<void(bool)> response, + std::function<void(std::exception_ptr)>, const Ice::Current&) +{ +#if defined(ICE_OS_UWP) + response(false); +#else + response(true); +#endif +} + +void MyDerivedClassI::opVoidAsync(function<void()> response, function<void(exception_ptr)>, const Ice::Current& current) @@ -1072,6 +1083,17 @@ MyDerivedClassI::shutdown_async(const Test::AMD_MyClass_shutdownPtr& cb, const I } void +MyDerivedClassI::supportsCompress_async(const Test::AMD_MyClass_supportsCompressPtr& cb, + const Ice::Current&) +{ +#if defined(ICE_OS_UWP) + cb->ice_response(false); +#else + cb->ice_response(true); +#endif +} + +void MyDerivedClassI::opVoid_async(const Test::AMD_MyClass_opVoidPtr& cb, const Ice::Current& current) { test(current.mode == ICE_ENUM(OperationMode, Normal)); diff --git a/cpp/test/Ice/operations/TestAMDI.h b/cpp/test/Ice/operations/TestAMDI.h index 7c934fb9cb8..2bcb5433a30 100644 --- a/cpp/test/Ice/operations/TestAMDI.h +++ b/cpp/test/Ice/operations/TestAMDI.h @@ -37,6 +37,10 @@ public: ::std::function<void(std::exception_ptr)>, const Ice::Current&); + virtual void supportsCompressAsync(std::function<void(bool)>, + std::function<void(std::exception_ptr)>, + const Ice::Current&); + virtual void opVoidAsync(::std::function<void()>, ::std::function<void(std::exception_ptr)>, const Ice::Current&); @@ -409,6 +413,9 @@ public: virtual void shutdown_async(const Test::AMD_MyClass_shutdownPtr&, const Ice::Current&); + virtual void supportsCompress_async(const Test::AMD_MyClass_supportsCompressPtr&, + const Ice::Current&); + virtual void opVoid_async(const Test::AMD_MyClass_opVoidPtr&, const Ice::Current&); diff --git a/cpp/test/Ice/operations/TestI.cpp b/cpp/test/Ice/operations/TestI.cpp index 1d2de97466b..4d0f3c0584a 100644 --- a/cpp/test/Ice/operations/TestI.cpp +++ b/cpp/test/Ice/operations/TestI.cpp @@ -64,6 +64,16 @@ MyDerivedClassI::shutdown(const Ice::Current& current) current.adapter->getCommunicator()->shutdown(); } +bool +MyDerivedClassI::supportsCompress(const Ice::Current& current) +{ +#if defined(ICE_OS_UWP) + return false; +#else + return true; +#endif +} + void MyDerivedClassI::opVoid(const Ice::Current& current) { diff --git a/cpp/test/Ice/operations/TestI.h b/cpp/test/Ice/operations/TestI.h index 484ebc15c77..d1897d9e130 100644 --- a/cpp/test/Ice/operations/TestI.h +++ b/cpp/test/Ice/operations/TestI.h @@ -33,6 +33,8 @@ public: virtual void shutdown(const Ice::Current&); + virtual bool supportsCompress(const Ice::Current&); + virtual void opVoid(const Ice::Current&); virtual Ice::Byte opByte(Ice::Byte, diff --git a/cpp/test/ios/controller/Bundle/ControllerI.mm b/cpp/test/ios/controller/Bundle/ControllerI.mm index f7742af4a1e..aa53de48d7b 100644 --- a/cpp/test/ios/controller/Bundle/ControllerI.mm +++ b/cpp/test/ios/controller/Bundle/ControllerI.mm @@ -159,7 +159,8 @@ MainHelperI::shutdown() bool MainHelperI::redirect() { - return _dll.find("client") != string::npos || _dll.find("collocated") != string::npos; + //return _dll.find("client") != string::npos || _dll.find("collocated") != string::npos; + return true; } void |