From 4e631700d66c51a96210e2bcbd8b3f63d8b0b9f4 Mon Sep 17 00:00:00 2001 From: Brent Eagles Date: Wed, 7 Sep 2005 16:14:20 +0000 Subject: revising fixes for bug 431 --- cpp/test/Ice/exceptions/AllTests.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cpp/test/Ice/exceptions/AllTests.cpp') diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 2b8eacbdca4..c4ed6ef4887 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -573,6 +573,22 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { // Expected } + + communicator->getProperties()->setProperty("TestAdapter0.Endpoints", ""); + try + { + Ice::ObjectAdapterPtr second = + communicator->createObjectAdapterWithEndpoints("TestAdapter0", "ssl -h foo -p 12346 -t 10000"); + test(false); + } + catch(const Ice::AlreadyRegisteredException&) + { + // Expected. + } + // + // Properties must remain unaffected if an exception occurs. + // + test(communicator->getProperties()->getProperty("TestAdapter0.Endpoints") == ""); first->deactivate(); } cout << "ok" << endl; -- cgit v1.2.3