summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-10-28 09:24:04 +0100
committerBenoit Foucher <benoit@zeroc.com>2014-10-28 09:24:04 +0100
commita1116f5c2949b0db654e6b899cad635826d3abb4 (patch)
tree6515f78f495c55e9a39b1ddd0dd4f243f6f6267a /cpp
parentFixed build system to allow compiling JS on OS X (diff)
downloadice-a1116f5c2949b0db654e6b899cad635826d3abb4.tar.bz2
ice-a1116f5c2949b0db654e6b899cad635826d3abb4.tar.xz
ice-a1116f5c2949b0db654e6b899cad635826d3abb4.zip
Fixed ICE-5777: Python and C# Ice/ami test failures when run with other protocols than tcp
Diffstat (limited to 'cpp')
-rw-r--r--cpp/test/Ice/ami/AllTests.cpp31
-rw-r--r--cpp/test/Ice/ami/Collocated.cpp4
2 files changed, 19 insertions, 16 deletions
diff --git a/cpp/test/Ice/ami/AllTests.cpp b/cpp/test/Ice/ami/AllTests.cpp
index 9cccac90a89..c3e96ac004e 100644
--- a/cpp/test/Ice/ami/AllTests.cpp
+++ b/cpp/test/Ice/ami/AllTests.cpp
@@ -1233,21 +1233,24 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
//
// Check that CommunicatorDestroyedException is raised directly.
//
- Ice::InitializationData initData;
- initData.properties = communicator->getProperties()->clone();
- Ice::CommunicatorPtr ic = Ice::initialize(initData);
- Ice::ObjectPrx obj = ic->stringToProxy(p->ice_toString());
- Test::TestIntfPrx p2 = Test::TestIntfPrx::checkedCast(obj);
- ic->destroy();
-
- try
- {
- p2->begin_op();
- test(false);
- }
- catch(const Ice::CommunicatorDestroyedException&)
+ if(p->ice_getConnection())
{
- // Expected.
+ Ice::InitializationData initData;
+ initData.properties = communicator->getProperties()->clone();
+ Ice::CommunicatorPtr ic = Ice::initialize(initData);
+ Ice::ObjectPrx obj = ic->stringToProxy(p->ice_toString());
+ Test::TestIntfPrx p2 = Test::TestIntfPrx::checkedCast(obj);
+ ic->destroy();
+
+ try
+ {
+ p2->begin_op();
+ test(false);
+ }
+ catch(const Ice::CommunicatorDestroyedException&)
+ {
+ // Expected.
+ }
}
}
cout << "ok" << endl;
diff --git a/cpp/test/Ice/ami/Collocated.cpp b/cpp/test/Ice/ami/Collocated.cpp
index f4036d7141e..1c1ef35fac0 100644
--- a/cpp/test/Ice/ami/Collocated.cpp
+++ b/cpp/test/Ice/ami/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(); // Collocated test doesn't need to activate the OA
adapter2->add(testController, communicator->stringToIdentity("testController"));
- adapter2->activate();
+ //adapter2->activate(); // Collocated test doesn't need to activate the OA
void allTests(const Ice::CommunicatorPtr&, bool);
allTests(communicator, true);