summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
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);