Open SenorPez opened 1 year ago
Sorry for the late answer but could you provide a reproducer? From your configuration it seems that you are not using test resources, since you are adding dependencies on testcontainers itself, which shouldn't be the case if you are using test resources.
Expected Behavior
Connection should be made to Docker by Test Resources.
Actual Behaviour
When run from a Gradle Test Suite instead of the built-in test task, the test attempts to connect to
127.0.0.1:27017
instead oflocalhost:56559
(or another randomly generated port, depending on settings). This results in the following error and no further test progress as the Docker images aren't created or accessible.Steps To Reproduce
Create a gradle build with an integration Test Suite.
Create a test that hits the database
The exact same test will properly start, pass, and close the test resources database in the
test
source set, and fail in theintegrationTest
source set.Environment Information
Example Application
No response
Version
3.8.8