Support parallel initialization of Testcontainers

Add support for a `spring.testcontainers.startup` property that can
be set to "sequential" or "parallel" to change how containers are
started.

Closes gh-37073
This commit is contained in:
Phillip Webb
2023-10-14 23:44:45 -07:00
parent 1edd1d5078
commit 4c3a0f09d7
11 changed files with 293 additions and 16 deletions

View File

@@ -78,8 +78,10 @@ public class DocumentConfigurationProperties extends DefaultTask {
snippets.add("application-properties.security", "Security Properties", this::securityPrefixes);
snippets.add("application-properties.rsocket", "RSocket Properties", this::rsocketPrefixes);
snippets.add("application-properties.actuator", "Actuator Properties", this::actuatorPrefixes);
snippets.add("application-properties.docker-compose", "Docker Compose Properties", this::dockerComposePrefixes);
snippets.add("application-properties.devtools", "Devtools Properties", this::devtoolsPrefixes);
snippets.add("application-properties.docker-compose", "Docker Compose Properties", this::dockerComposePrefixes);
snippets.add("application-properties.testcontainers", "Testcontainers Properties",
this::testcontainersPrefixes);
snippets.add("application-properties.testing", "Testing Properties", this::testingPrefixes);
snippets.writeTo(this.outputDir.toPath());
}
@@ -224,7 +226,11 @@ public class DocumentConfigurationProperties extends DefaultTask {
}
private void testingPrefixes(Config prefix) {
prefix.accept("spring.test");
prefix.accept("spring.test.");
}
private void testcontainersPrefixes(Config prefix) {
prefix.accept("spring.testcontainers.");
}
}