Problem
The test suite cannot run in a clean local environment because Spring Boot tests attempt to connect to MySQL/Flyway using application configuration instead of an isolated test database/profile.
Why this is not production ready
If tests require manually provisioned external state, they are not a reliable safety net for production changes. Developers and CI cannot quickly verify regressions in auth, scheduling, persistence, and controller behavior.
Evidence
Running ./gradlew test completed compilation but failed test execution: 108 tests ran and 79 failed. The first failure was FlywaySqlException caused by com.mysql.cj.jdbc.exceptions.CommunicationsException / java.net.ConnectException while loading the Spring context.
Required work
- Add
src/test/resources/application-test.properties or equivalent test profile.
- Use H2/Testcontainers/MySQL test container consistently for integration tests.
- Ensure Flyway migrations run against the test database or are explicitly disabled for slice tests.
- Make
./gradlew test pass from a fresh clone without local MySQL.
- Document how to run unit, integration, and full test suites.
Acceptance criteria
./gradlew test passes on a clean machine without manually running MySQL.
- CI can run the same test command reliably.
- Tests do not depend on developer-local
.env or production-like secrets.
- The test profile is clearly separated from production configuration.
Problem
The test suite cannot run in a clean local environment because Spring Boot tests attempt to connect to MySQL/Flyway using application configuration instead of an isolated test database/profile.
Why this is not production ready
If tests require manually provisioned external state, they are not a reliable safety net for production changes. Developers and CI cannot quickly verify regressions in auth, scheduling, persistence, and controller behavior.
Evidence
Running
./gradlew testcompleted compilation but failed test execution: 108 tests ran and 79 failed. The first failure wasFlywaySqlExceptioncaused bycom.mysql.cj.jdbc.exceptions.CommunicationsException/java.net.ConnectExceptionwhile loading the Spring context.Required work
src/test/resources/application-test.propertiesor equivalent test profile../gradlew testpass from a fresh clone without local MySQL.Acceptance criteria
./gradlew testpasses on a clean machine without manually running MySQL..envor production-like secrets.