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

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

commit 893081d63c82a78c479b3ccdbd6be64385c860be
Author: Andriy Redko <[email protected]>
AuthorDate: Thu Aug 22 20:34:56 2024 -0400

    Attempt to troubleshoot 
org.apache.cxf.ws.discovery.WSDiscoveryClientTest.testMultiResponses
    
    (cherry picked from commit 7db5e675a342db5b49f6627e8e5e55fb117c9484)
    (cherry picked from commit 89bb6b9fdc7489bd07828d32910bc930104509e7)
---
 .../org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java     | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

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 b2e5b32ef5..ea7245caf0 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
@@ -74,6 +74,7 @@ public final class WSDiscoveryClientTest {
                         if (ia.getAddress() instanceof java.net.Inet4Address 
&& !ia.getAddress().isLoopbackAddress()
                                 && !ni.getDisplayName().startsWith("vnic")) {
                             possibles.add(ni);
+                            System.out.println("Found possible network 
interface:" + ni.getDisplayName());
                         }
                     }
                 }
@@ -81,10 +82,17 @@ public final class WSDiscoveryClientTest {
         }
         for (NetworkInterface p : possibles) {
             if (p.isPointToPoint()) {
+                System.out.println("Using p2p network interface:" + 
p.getDisplayName());
                 return p;
             }
         }
-        return possibles.isEmpty() ? null : possibles.get(possibles.size() - 
1);
+        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