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
pull/30505/head
Andy Wilkinson 3 years ago
parent f3eb90046f
commit 4bcb7e2f77

@ -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 {

Loading…
Cancel
Save