This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git
The following commit(s) were added to refs/heads/2.2.X by this push:
new 6c642a653 Fixed a failing test: the address we are creating is not
correct, we should use the one the acceptor is bound on
6c642a653 is described below
commit 6c642a6535631d995e7bd4118f7919b4a14cf241
Author: emmanuel lecharny <[email protected]>
AuthorDate: Fri Oct 2 08:54:11 2026 +0200
Fixed a failing test: the address we are creating is not correct, we should
use the one the acceptor is bound on
---
.../java/org/apache/mina/transport/socket/nio/SocketAcceptorTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/mina-core/src/test/java/org/apache/mina/transport/socket/nio/SocketAcceptorTest.java
b/mina-core/src/test/java/org/apache/mina/transport/socket/nio/SocketAcceptorTest.java
index 6b5995435..20073284c 100644
---
a/mina-core/src/test/java/org/apache/mina/transport/socket/nio/SocketAcceptorTest.java
+++
b/mina-core/src/test/java/org/apache/mina/transport/socket/nio/SocketAcceptorTest.java
@@ -58,8 +58,8 @@ public class SocketAcceptorTest {
acceptor.setReuseAddress(true);
acceptor.setHandler(new IoHandlerAdapter());
try {
- int port = AcceptorBindUtil.tryBind(acceptor);
- InetSocketAddress address = new InetSocketAddress("127.0.0.1",
port);
+ AcceptorBindUtil.tryBind(acceptor);
+ InetSocketAddress address = acceptor.getLocalAddress() ;
acceptor.unbind(address);
acceptor.bind(address);
acceptor.unbind(address);