summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/udp/AllTests.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/test/Ice/udp/AllTests.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/test/Ice/udp/AllTests.cpp')
-rw-r--r--cpp/test/Ice/udp/AllTests.cpp7
1 files changed, 5 insertions, 2 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);