diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-11-04 12:15:52 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-11-04 12:15:52 +0100 |
commit | 2a707c77f3342955869b98565f4abd8051a1f45a (patch) | |
tree | 55e1d24b31eac51ea2c4fdc4885f66385c058dc4 /cpp/test/Ice | |
parent | ICE-5811 - Minor fix for Java demo distribution build (diff) | |
download | ice-2a707c77f3342955869b98565f4abd8051a1f45a.tar.bz2 ice-2a707c77f3342955869b98565f4abd8051a1f45a.tar.xz ice-2a707c77f3342955869b98565f4abd8051a1f45a.zip |
Fixed ICE-5819: added comments and fixed some tests to work with deactivated OA
Diffstat (limited to 'cpp/test/Ice')
-rw-r--r-- | cpp/test/Ice/dispatcher/Collocated.cpp | 4 | ||||
-rw-r--r-- | cpp/test/Ice/metrics/Collocated.cpp | 4 | ||||
-rw-r--r-- | cpp/test/Ice/operations/Collocated.cpp | 2 | ||||
-rw-r--r-- | cpp/test/Ice/operations/Twoways.cpp | 1 | ||||
-rw-r--r-- | cpp/test/Ice/operations/TwowaysAMI.cpp | 1 | ||||
-rw-r--r-- | cpp/test/Ice/proxy/AllTests.cpp | 10 | ||||
-rw-r--r-- | cpp/test/Ice/proxy/Collocated.cpp | 2 | ||||
-rw-r--r-- | cpp/test/Ice/retry/Collocated.cpp | 2 |
8 files changed, 14 insertions, 12 deletions
diff --git a/cpp/test/Ice/dispatcher/Collocated.cpp b/cpp/test/Ice/dispatcher/Collocated.cpp index 0cb6dc6e897..94e874f9d9d 100644 --- a/cpp/test/Ice/dispatcher/Collocated.cpp +++ b/cpp/test/Ice/dispatcher/Collocated.cpp @@ -29,10 +29,10 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) TestIntfControllerIPtr testController = new TestIntfControllerI(adapter); adapter->add(new TestIntfI(), communicator->stringToIdentity("test")); - //adapter->activate(); + //adapter->activate(); // Don't activate OA to ensure collocation is used. adapter2->add(testController, communicator->stringToIdentity("testController")); - //adapter2->activate(); + //adapter2->activate(); // Don't activate OA to ensure collocation is used. void allTests(const Ice::CommunicatorPtr&); allTests(communicator); diff --git a/cpp/test/Ice/metrics/Collocated.cpp b/cpp/test/Ice/metrics/Collocated.cpp index 8b9943fe2b8..062fe3bda84 100644 --- a/cpp/test/Ice/metrics/Collocated.cpp +++ b/cpp/test/Ice/metrics/Collocated.cpp @@ -24,12 +24,12 @@ run(int, char**, const Ice::CommunicatorPtr& communicator, const CommunicatorObs Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new MetricsI; adapter->add(object, communicator->stringToIdentity("metrics")); - //adapter->activate(); + //adapter->activate(); // Don't activate OA to ensure collocation is used. communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", "default -p 12011"); Ice::ObjectAdapterPtr controllerAdapter = communicator->createObjectAdapter("ControllerAdapter"); controllerAdapter->add(new ControllerI(adapter), communicator->stringToIdentity("controller")); - //controllerAdapter->activate(); + //controllerAdapter->activate(); // Don't activate OA to ensure collocation is used. MetricsPrx allTests(const Ice::CommunicatorPtr&, const CommunicatorObserverIPtr&); MetricsPrx metrics = allTests(communicator, observer); diff --git a/cpp/test/Ice/operations/Collocated.cpp b/cpp/test/Ice/operations/Collocated.cpp index 840a6defa81..1bae52850c1 100644 --- a/cpp/test/Ice/operations/Collocated.cpp +++ b/cpp/test/Ice/operations/Collocated.cpp @@ -23,7 +23,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator, communicator->getProperties()->setProperty("TestAdapter.AdapterId", "test"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPrx prx = adapter->add(new MyDerivedClassI, communicator->stringToIdentity("test")); - adapter->activate(); + //adapter->activate(); // Don't activate OA to ensure collocation is used. test(!prx->ice_getConnection()); diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp index 45f462dd430..8edf98ddb16 100644 --- a/cpp/test/Ice/operations/Twoways.cpp +++ b/cpp/test/Ice/operations/Twoways.cpp @@ -1472,6 +1472,7 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p) } #ifndef ICE_OS_WINRT + if(p->ice_getConnection()) { // // Test implicit context propagation diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp index eab375624ac..e724ca9a060 100644 --- a/cpp/test/Ice/operations/TwowaysAMI.cpp +++ b/cpp/test/Ice/operations/TwowaysAMI.cpp @@ -1949,6 +1949,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p) } #ifndef ICE_OS_WINRT + if(p->ice_getConnection()) { // // Test implicit context propagation diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp index b9371178371..54b3aa65628 100644 --- a/cpp/test/Ice/proxy/AllTests.cpp +++ b/cpp/test/Ice/proxy/AllTests.cpp @@ -764,7 +764,7 @@ allTests(const Ice::CommunicatorPtr& communicator) Test::MyClassPrx cl20 = Test::MyClassPrx::uncheckedCast(communicator->stringToProxy(ref20)); try { - cl20->ice_collocationOptimized(false)->ice_ping(); + cl20->ice_ping(); test(false); } catch(const Ice::UnsupportedEncodingException&) @@ -776,7 +776,7 @@ allTests(const Ice::CommunicatorPtr& communicator) Test::MyClassPrx cl10 = Test::MyClassPrx::uncheckedCast(communicator->stringToProxy(ref10)); cl10->ice_ping(); cl10->ice_encodingVersion(Ice::Encoding_1_0)->ice_ping(); - cl->ice_collocationOptimized(false)->ice_encodingVersion(Ice::Encoding_1_0)->ice_ping(); + cl->ice_encodingVersion(Ice::Encoding_1_0)->ice_ping(); // 1.3 isn't supported but since a 1.3 proxy supports 1.1, the // call will use the 1.1 encoding @@ -797,7 +797,7 @@ allTests(const Ice::CommunicatorPtr& communicator) inEncaps[4] = version.major; inEncaps[5] = version.minor; vector<Ice::Byte> outEncaps; - cl->ice_collocationOptimized(false)->ice_invoke("ice_ping", Ice::Normal, inEncaps, outEncaps); + cl->ice_invoke("ice_ping", Ice::Normal, inEncaps, outEncaps); test(false); } catch(const Ice::UnknownLocalException& ex) @@ -818,7 +818,7 @@ allTests(const Ice::CommunicatorPtr& communicator) inEncaps[4] = version.major; inEncaps[5] = version.minor; vector<Ice::Byte> outEncaps; - cl->ice_collocationOptimized(false)->ice_invoke("ice_ping", Ice::Normal, inEncaps, outEncaps); + cl->ice_invoke("ice_ping", Ice::Normal, inEncaps, outEncaps); test(false); } catch(const Ice::UnknownLocalException& ex) @@ -835,7 +835,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cl20 = Test::MyClassPrx::uncheckedCast(communicator->stringToProxy(ref20)); try { - cl20->ice_collocationOptimized(false)->ice_ping(); + cl20->ice_ping(); test(false); } catch(const Ice::UnsupportedProtocolException&) diff --git a/cpp/test/Ice/proxy/Collocated.cpp b/cpp/test/Ice/proxy/Collocated.cpp index 6c5465cff47..a5fafa0ed7f 100644 --- a/cpp/test/Ice/proxy/Collocated.cpp +++ b/cpp/test/Ice/proxy/Collocated.cpp @@ -22,7 +22,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator, communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->add(new MyDerivedClassI, communicator->stringToIdentity("test")); - adapter->activate(); + //adapter->activate(); // Don't activate OA to ensure collocation is used. Test::MyClassPrx allTests(const Ice::CommunicatorPtr&); allTests(communicator); diff --git a/cpp/test/Ice/retry/Collocated.cpp b/cpp/test/Ice/retry/Collocated.cpp index 3093330d89c..9f6f8ae407a 100644 --- a/cpp/test/Ice/retry/Collocated.cpp +++ b/cpp/test/Ice/retry/Collocated.cpp @@ -25,7 +25,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new RetryI; adapter->add(object, communicator->stringToIdentity("retry")); - adapter->activate(); + //adapter->activate(); // Don't activate OA to ensure collocation is used. RetryPrx allTests(const Ice::CommunicatorPtr&); RetryPrx retry = allTests(communicator); |