This is an automated email from the ASF dual-hosted git repository. coheigea pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit d0734d54d86e100220fcf64430fd022fa4abdda7 Author: Colm O hEigeartaigh <[email protected]> AuthorDate: Wed Jul 8 09:51:53 2026 +0100 Set setReuseAddress on the test socket to try to reduce port conflicts (#3290) (cherry picked from commit d8009cd959308d0448705d3d46621758fe4b37c1) --- testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java b/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java index db05aae0ded..3676009086f 100644 --- a/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java +++ b/testutils/src/main/java/org/apache/cxf/testutil/common/TestUtil.java @@ -199,6 +199,8 @@ public final class TestUtil { while (p == null) { int pn = portNum++; try (ServerSocket sock = new ServerSocket(pn)) { + // Enable SO_REUSEADDR to allow faster port reuse after socket closure + sock.setReuseAddress(true); //make sure the port can be opened. Something MIGHT be running on it. p = Integer.toString(pn); LOG.fine("Setting port for " + fullName + " to " + p);
