mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
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:
parent
f3eb90046f
commit
4bcb7e2f77
@ -33,7 +33,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
*
|
*
|
||||||
* @author Madhura Bhave
|
* @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")
|
@ActiveProfiles("hello")
|
||||||
class ActiveProfilesTests {
|
class ActiveProfilesTests {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user