summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/facets/AllTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/facets/AllTests.cpp')
-rw-r--r--cpp/test/Ice/facets/AllTests.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/cpp/test/Ice/facets/AllTests.cpp b/cpp/test/Ice/facets/AllTests.cpp
index 9ea52c2f771..c10ba942b0a 100644
--- a/cpp/test/Ice/facets/AllTests.cpp
+++ b/cpp/test/Ice/facets/AllTests.cpp
@@ -44,9 +44,20 @@ allTests(const Ice::CommunicatorPtr& communicator)
cout << "ok" << endl;
cout << "testing facet registration exceptions... " << flush;
- string host = communicator->getProperties()->getPropertyAsIntWithDefault("Ice.IPv6", 0) == 0 ?
- "127.0.0.1" : "\"0:0:0:0:0:0:0:1\"";
- communicator->getProperties()->setProperty("FacetExceptionTestAdapter.Endpoints", "default -h " + host);
+ string localOAEndpoint;
+ {
+ ostringstream ostr;
+ if(communicator->getProperties()->getProperty("Ice.Default.Protocol") == "bt")
+ {
+ ostr << "default -a *";
+ }
+ else
+ {
+ ostr << "default -h *";
+ }
+ localOAEndpoint = ostr.str();
+ }
+ communicator->getProperties()->setProperty("FacetExceptionTestAdapter.Endpoints", localOAEndpoint);
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("FacetExceptionTestAdapter");
Ice::ObjectPtr obj = ICE_MAKE_SHARED(EmptyI);
adapter->add(obj, communicator->stringToIdentity("d"));
@@ -101,7 +112,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
adapter->deactivate();
cout << "testing stringToProxy... " << flush;
- string ref = "d:default -p 12010";
+ string ref = "d:" + getTestEndpoint(communicator, 0);
Ice::ObjectPrxPtr db = communicator->stringToProxy(ref);
test(db);
cout << "ok" << endl;