Skip to content

SocketUtils does not properly detect available port on localhost [SPR-13321] #17906

@spring-projects-issues

Description

@spring-projects-issues

Gary Russell opened SPR-13321 and commented

Status Quo

SocketUtils attempts to find an unused socket.

This does not work (at least on OS X) if something is already bound to localhost but not to other network interfaces. Instead, the requested socket is successfully bound to other network interfaces.

Proposal

Since tests generally want to bind to localhost, SocketUtils should test the loopback interface to ensure that the port is actually available for localhost.

Further Resources

See pull request 1537 for a similar fix in Spring Integration.


Affects: 4.0 GA

Referenced from: pull request #853, and commits f151404

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)in: testIssues in the test moduletype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions