summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-06-07 10:54:08 +0200
committerBenoit Foucher <benoit@zeroc.com>2017-06-07 10:54:08 +0200
commit10c84db9450f0ac5025bb6ce583f5c2c7277eafa (patch)
treeb6259c635aad9d4a3a073f79e02ec27ebd138dbe /cpp
parentFix (ICE-7978) - python asyncInvocation amzn1 failure (diff)
downloadice-10c84db9450f0ac5025bb6ce583f5c2c7277eafa.tar.bz2
ice-10c84db9450f0ac5025bb6ce583f5c2c7277eafa.tar.xz
ice-10c84db9450f0ac5025bb6ce583f5c2c7277eafa.zip
Fixed ICE-7980 - Ice/udp test failure
Diffstat (limited to 'cpp')
-rw-r--r--cpp/test/Ice/udp/AllTests.cpp7
-rw-r--r--cpp/test/Ice/udp/Server.cpp4
2 files changed, 7 insertions, 4 deletions
diff --git a/cpp/test/Ice/udp/AllTests.cpp b/cpp/test/Ice/udp/AllTests.cpp
index 450d6e6c9f5..863509f403a 100644
--- a/cpp/test/Ice/udp/AllTests.cpp
+++ b/cpp/test/Ice/udp/AllTests.cpp
@@ -138,13 +138,16 @@ allTests(const CommunicatorPtr& communicator)
if(communicator->getProperties()->getProperty("Ice.IPv6") == "1")
{
endpoint << "udp -h \"ff15::1:1\" -p " << getTestPort(communicator->getProperties(), 10);
-#ifdef __APPLE__
- endpoint << " --interface \"::1\"";
+#if defined(__APPLE__) || defined(_WIN32)
+ endpoint << " --interface \"::1\""; // Use loopback to prevent other machines to answer. the multicast requests.
#endif
}
else
{
endpoint << "udp -h 239.255.1.1 -p " << getTestPort(communicator->getProperties(), 10);
+#if defined(__APPLE__) || defined(_WIN32)
+ endpoint << " --interface 127.0.0.1"; // Use loopback to prevent other machines to answer.
+#endif
}
base = communicator->stringToProxy("test -d:" + endpoint.str());
TestIntfPrxPtr objMcast = ICE_UNCHECKED_CAST(TestIntfPrx, base);
diff --git a/cpp/test/Ice/udp/Server.cpp b/cpp/test/Ice/udp/Server.cpp
index 83b26ea58fb..37ab0c72b63 100644
--- a/cpp/test/Ice/udp/Server.cpp
+++ b/cpp/test/Ice/udp/Server.cpp
@@ -40,14 +40,14 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
endpoint << "udp -h \"ff15::1:1\" -p " << getTestPort(properties, 10);
#if defined(__APPLE__) || defined(_WIN32)
- endpoint << " --interface \"::1\"";
+ endpoint << " --interface \"::1\""; // Use loopback to prevent other machines to answer.
#endif
}
else
{
endpoint << "udp -h 239.255.1.1 -p " << getTestPort(properties, 10);
#if defined(__APPLE__) || defined(_WIN32)
- endpoint << " --interface 127.0.0.1";
+ endpoint << " --interface 127.0.0.1"; // Use loopback to prevent other machines to answer.
#endif
}
properties->setProperty("McastTestAdapter.Endpoints", endpoint.str());