Skip to content

Commit

Permalink
Fix org.apache.cxf.ws.discovery.WSDiscoveryClientTest.testMultiResponses
Browse files Browse the repository at this point in the history
(cherry picked from commit ad9ba43)
(cherry picked from commit 24b8a14)
(cherry picked from commit c23fbec)

# Conflicts:
#	services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java
  • Loading branch information
reta committed Aug 28, 2024
1 parent 1d97b8f commit ad5929b
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,28 @@ static NetworkInterface findIpv4Interface() throws Exception {
if (ni.supportsMulticast() && ni.isUp()) {
for (InterfaceAddress ia : ni.getInterfaceAddresses()) {
if (ia.getAddress() instanceof java.net.Inet4Address && !ia.getAddress().isLoopbackAddress()
&& !ni.getDisplayName().startsWith("vnic")) {
&& !ni.getDisplayName().startsWith("vnic")
&& !ni.getDisplayName().startsWith("tailscale")) {
possibles.add(ni);
}
}
}
}
}
return possibles.isEmpty() ? null : possibles.get(possibles.size() - 1);

for (NetworkInterface p : possibles) {
if (p.isPointToPoint()) {
System.out.println("Using p2p network interface:" + p.getDisplayName());
return p;
}
}
if (possibles.isEmpty()) {
return null;
} else {
final NetworkInterface ni = possibles.get(possibles.size() - 1);
System.out.println("Using network interface:" + ni.getDisplayName());
return ni;
}
}

@Test
Expand Down

0 comments on commit ad5929b

Please sign in to comment.