Skip to content

Commit 2d30534

Browse files
committed
Merge branch '2.0.x'
2 parents 33d385c + 4630c22 commit 2d30534

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ public void launchApplication() throws Exception {
8080

8181
@After
8282
public void stopApplication() throws InterruptedException {
83-
this.launchedApplication.stop();
83+
if (this.launchedApplication != null) {
84+
this.launchedApplication.stop();
85+
}
8486
}
8587

8688
@Test

spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/RemoteApplicationLauncher.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public LaunchedApplication launchApplication(JvmLauncher javaLauncher)
4040
throws Exception {
4141
LaunchedJvm applicationJvm = javaLauncher.launch("app",
4242
createApplicationClassPath(), "com.example.DevToolsTestApplication",
43-
"--server.port=12345", "--spring.devtools.remote.secret=secret");
44-
awaitServerPort(applicationJvm.getStandardOut());
43+
"--server.port=0", "--spring.devtools.remote.secret=secret");
44+
int port = awaitServerPort(applicationJvm.getStandardOut());
4545
LaunchedJvm remoteSpringApplicationJvm = javaLauncher.launch(
4646
"remote-spring-application", createRemoteSpringApplicationClassPath(),
4747
RemoteSpringApplication.class.getName(),
48-
"--spring.devtools.remote.secret=secret", "http://localhost:12345");
48+
"--spring.devtools.remote.secret=secret", "http://localhost:" + port);
4949
awaitRemoteSpringApplication(remoteSpringApplicationJvm.getStandardOut());
5050
return new LaunchedApplication(new File("target/remote"),
5151
applicationJvm.getStandardOut(), applicationJvm.getStandardError(),

0 commit comments

Comments
 (0)