This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.5.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit ad5929b71391e64248a003d8869509c4e0095409
Author: Andriy Redko <[email protected]>
AuthorDate: Fri Aug 23 08:01:21 2024 -0400

    Fix org.apache.cxf.ws.discovery.WSDiscoveryClientTest.testMultiResponses
    
    (cherry picked from commit ad9ba4313f31067e41d55d22fd148aeec118ee90)
    (cherry picked from commit 24b8a14e48c715631fb578b1b5f7fe0548e1941d)
    (cherry picked from commit c23fbecf3b06514ec8b82cb9407be3772614dffd)
    
    # Conflicts:
    #       
services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java
---
 .../apache/cxf/ws/discovery/WSDiscoveryClientTest.java | 18 ++++++++++++++++--
 1 file changed, 16 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 b8a313802c..859eb2add0 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
@@ -67,14 +67,28 @@ public final class WSDiscoveryClientTest {
                 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

Reply via email to