You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2022/09/27 09:32:14 UTC
[cxf] 01/01: Fix ws-discovery test on non-M1 Macs
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch coheigea/ws-discovery-mac
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 385c156f53fdbf5c5ff78a628d34f4c8a3dfffd5
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue Sep 27 10:31:45 2022 +0100
Fix ws-discovery test on non-M1 Macs
---
.../java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java b/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java
index 93a6b38c55..55887fbafb 100644
--- a/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java
+++ b/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java
@@ -79,7 +79,9 @@ public final class WSDiscoveryClientTest {
@Test
public void testMultiResponses() throws Exception {
// Disable the test on Redhat Enterprise Linux which doesn't enable the UDP broadcast by default
- if ("Linux".equals(System.getProperties().getProperty("os.name"))
+ final String osName = System.getProperties().getProperty("os.name");
+ final String osArch = System.getProperties().getProperty("os.arch");
+ if ("Linux".equals(osName)
&& System.getProperties().getProperty("os.version").indexOf("el") > 0) {
System.out.println("Skipping MultiResponse test for REL");
return;
@@ -107,7 +109,7 @@ public final class WSDiscoveryClientTest {
//fake a discovery server to send back some canned messages.
InetAddress address = InetAddress.getByName("239.255.255.250");
MulticastSocket s = new MulticastSocket(Integer.parseInt(PORT));
- if (!"Mac OS X".equals(System.getProperties().getProperty("os.name"))) {
+ if (!("Mac OS X".equals(osName) && !"x86_64".equals(osArch))) {
s.setNetworkInterface(findIpv4Interface());
}
s.setBroadcast(true);