-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Description
Greetings!
As stated in this seemingly unrelated ticket #38554 we are currently facing an issue when running multiple Spring boot tests one after another.
i took the liberty and created a reproducer for this case. The tests in the attached zip file work with spring boot 3.1.5 but fail on 3.2.0.
In my example I add a new http connector with a fixed port. When running each test on its own they work. But if they're executed in a row i.e. by a mvn verify the second tests fails on initialization stating that the configured connector failed to start.
Maven doesn't print the reason too clearly unfortunately but a little closer investigation inside a IDE reveals the java.net.BindException: Address already in use: bind exception.
In this example also the "@DirtiesContext" doesn't help. It seems as if the Spring / ApplicationContext is cleaned up and the new server instance is going to boot but the old instance of the server hasn't shut down yet or isn't shutting down at all.
Thanks in advance!