summaryrefslogtreecommitdiff
path: root/csharp/test
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2020-12-11 10:37:27 +0100
committerJose <jose@zeroc.com>2020-12-11 10:37:27 +0100
commitfff23373c6d2c2585cf8681b6ff325a1b77419b0 (patch)
tree19b36a1c50e4173414478d5907d1d695e04c7c22 /csharp/test
parentIceSSL/configuration test fix for .NET 5.0 (diff)
downloadice-fff23373c6d2c2585cf8681b6ff325a1b77419b0.tar.bz2
ice-fff23373c6d2c2585cf8681b6ff325a1b77419b0.tar.xz
ice-fff23373c6d2c2585cf8681b6ff325a1b77419b0.zip
Fix Ice/udp test for platforms without multicast IPv6 support
Diffstat (limited to 'csharp/test')
-rw-r--r--csharp/test/Ice/udp/AllTests.cs19
1 files changed, 16 insertions, 3 deletions
diff --git a/csharp/test/Ice/udp/AllTests.cs b/csharp/test/Ice/udp/AllTests.cs
index fc2dee815a9..c957eee81a5 100644
--- a/csharp/test/Ice/udp/AllTests.cs
+++ b/csharp/test/Ice/udp/AllTests.cs
@@ -149,7 +149,7 @@ namespace Ice
//
// Use loopback to prevent other machines to answer.
//
- if(communicator.getProperties().getProperty("Ice.IPv6").Equals("1"))
+ if(communicator.getProperties().getProperty("Ice.IPv6") == "1")
{
endpoint.Append("udp -h \"ff15::1:1\"");
if(IceInternal.AssemblyUtil.isWindows || IceInternal.AssemblyUtil.isMacOS)
@@ -174,7 +174,21 @@ namespace Ice
while(nRetry-- > 0)
{
replyI.reset();
- objMcast.ping(reply);
+ try
+ {
+ objMcast.ping(reply);
+ }
+ catch(Ice.SocketException)
+ {
+ if(communicator.getProperties().getProperty("Ice.IPv6") == "1")
+ {
+ // Multicast IPv6 not supported on the platform. This occurs for example on macOS big_suir
+ Console.Out.Write("(not supported) ");
+ ret = true;
+ break;
+ }
+ throw;
+ }
ret = replyI.waitReply(5, 5000);
if(ret)
{
@@ -195,7 +209,6 @@ namespace Ice
Console.Out.Write("testing udp bi-dir connection... ");
Console.Out.Flush();
obj.ice_getConnection().setAdapter(adapter);
- objMcast.ice_getConnection().setAdapter(adapter);
nRetry = 5;
while(nRetry-- > 0)
{