Skip to content

Port is already in use when using @SpringBootTest with a separate management port and a mock web environment #38554

@jimshowalter

Description

@jimshowalter

We didn't change anything in our code or configuration, other than upgrading versions.

We can run the service locally, and can run the tests individually. But when we try to run the tests together, we get the port error.

We were already on Spring 6.1.0 and Spring Boot 3.1.5, so this should have been a small upgrade.

We're using the latest version of JUnit, and are not running the tests in parallel.

The tests fail with the port error whether virtual threads are enabled or disabled.

Is there some new cleanup/finalization we need to add? We looked at the release notes for both Spring and Spring Boot and didn't see anything relevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: regressionA regression from a previous release

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions