Prevent ActiveProfilesTests from binding to 8080

Due to gh-29695, smoketest.profile.ActiveProfilesTests starts a web
server bound to the default port (8080) despite the test setting
`webEnvironment` to `NONE`.

This commit works around the problem by running the tests with
server.port set to zero.

Closes gh-30086
This commit is contained in:
Andy Wilkinson 2022-03-07 14:55:00 +00:00
parent f3eb90046f
commit 4bcb7e2f77

View File

@ -33,7 +33,8 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Madhura Bhave
*/
@SpringBootTest(webEnvironment = WebEnvironment.NONE, properties = "enableEnvironmentPostProcessor=true") // gh-28530
@SpringBootTest(webEnvironment = WebEnvironment.NONE,
properties = { "enableEnvironmentPostProcessor=true", "server.port=0" }) // gh-28530
@ActiveProfiles("hello")
class ActiveProfilesTests {