diff --git a/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java b/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java index e970b0aade..8c6ef0e9ed 100644 --- a/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java +++ b/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java @@ -139,7 +139,7 @@ public class DevToolsIntegrationTests { private int awaitServerPort() throws Exception { long end = System.currentTimeMillis() + 20000; - while (!this.serverPortFile.exists()) { + while (this.serverPortFile.length() == 0) { if (System.currentTimeMillis() > end) { throw new IllegalStateException( "server.port file was not written within 20 seconds");