diff --git a/spring-boot-samples/spring-boot-sample-integration/src/test/java/sample/integration/consumer/SampleIntegrationApplicationTests.java b/spring-boot-samples/spring-boot-sample-integration/src/test/java/sample/integration/consumer/SampleIntegrationApplicationTests.java index 904e3d2918..cf4441730c 100644 --- a/spring-boot-samples/spring-boot-sample-integration/src/test/java/sample/integration/consumer/SampleIntegrationApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-integration/src/test/java/sample/integration/consumer/SampleIntegrationApplicationTests.java @@ -113,7 +113,9 @@ public class SampleIntegrationApplicationTests { .getResourcePatternResolver(new DefaultResourceLoader()) .getResources("file:target/output/**"); for (Resource candidate : candidates) { - if (candidate.contentLength() == 0) { + if ((candidate.getFilename() != null + && candidate.getFilename().endsWith(".writing")) + || candidate.contentLength() == 0) { return new Resource[0]; } }