spring-projects / spring-projects/spring-boot
Docker Compose support does not work in AOT-processed tests
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
This can be reproduced using Petclinic's tests with AOT enabled:
tasks.named('test') {
useJUnitPlatform()
systemProperty "spring.aot.enabled", true
}
./gradlew test fails with both tests in PostgresIntegrationTests failing as they could not connect to Postgres. They try to use the default host and port rather than those of a container starter by Docker Compose.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in Spring Petclinic with the shown Gradle test configuration and AOT enabled. Start with the PostgresIntegrationTests and the Docker Compose container-starter integration, then trace why the tests use the default host and port; done means both tests connect to the Compose-managed Postgres instance under AOT.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, java, spring-boot
- Domain
- backend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100