Questions tagged [testcontainers-junit5]
89 questions
0
votes
0 answers
testContainers Initialization Error with java.lang.InterruptedException
I am having this error running Quarkus tests with docker-compose, upgrading from Quarkus 2.4.0 to Quarkus 2.15.0, not sure why it is happening, but if anybody can shed some light it will be helpful.
It happens running integration tests, it sounds…

Chexpir
- 1,876
- 18
- 33
0
votes
1 answer
How to load properties dynamically to application testcontainer?
I am trying to make an integration test of a Java application that uses a jdbc postgres connection.
In the integration test i spawn two testcontainers, an application one and a postgres one.
How can i inject in the application the…

paraflou
- 413
- 1
- 7
- 14
0
votes
0 answers
Load Liquibase files in Oracle xe Test Container from different module in spring boot project
I need to write DataJpaTest for the repository tests using the oracle test container. Using
spring.liquibase.change-log=classpath:/liquibase/liquibaseChangeLog.xml
but Liquibase file exists in a different module called database
Project structure:
-…

Ram Tungala
- 1
- 1
0
votes
0 answers
setting up multiple test containers in spring boot
hi i have the following:
@Testcontainers
@Slf4j
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class IntegrationTestContainerSetup {
@Container
static final PostgreSQLContainer POSTGRES_CONTAINER = new......;
…

user1555190
- 2,803
- 8
- 47
- 80
0
votes
1 answer
Using TestContainers with Junit 5 and Dependency Injection through @SpringBootTest not working due to application.properties
I get the following Errors:
org.junit.jupiter.api.extension.ParameterResolutionException: Failed to resolve parameter [solutions.nabucco.nabuccobackendservice.user.core.repository.IntegrationTestRepository integrationTestRepository] in constructor…

FireRedDev
- 3
- 2
0
votes
1 answer
Testcontainers get image form private registry, docker login, credentials
I have 2 Spring micro services (A and B) and I need to test micro service A against B. In micro service A I want to use test containers to start an image of micro service B and do my tests.
The micro service B image is in a private registry, if I…

Bobernac Alexandru
- 169
- 1
- 2
- 11
0
votes
1 answer
I cannot connect to kafka using a test container while the integration is writing a test
using testcontainer; I'm trying to write an integration test for my project with kafka, postgreSql and elasticsearch, but when I run docker-compose_v2.yml file and run my tests, my tests are successful, but when I use testcontainer, my tests fail, I…

Semih
- 5
- 4
0
votes
1 answer
TestContainer doesn't reuse existing containers and creates new one instead
I am using the testcontainers withReuse function in Groovy to reuse the containers between builds. After the tests run, the containers don't get deleted anymore. However, when I run the tests again, instead of reusing the existing one it creates a…

Ajay
- 21
- 2
0
votes
0 answers
connection refused error when running all tests in a test class with micronaut hibernate reactive
When running individually test will pass, but when running all tests from the test class, test will fail with the vert.x java net connection refused exception. For reference, test class inherits from the base test class that sets up the shared…

JerryThePineapple
- 63
- 8
0
votes
1 answer
KafkaListener Not triggered in Spring Boot test
I have a spring boot test to check if a kafka consumer listens for a message in specific topic. The kafka listener is triggered when using @SpringBootTest. But I just don't want to load all the classes and I only supplied the listener class like…

tsadkan yitbarek
- 1,360
- 2
- 11
- 28
0
votes
1 answer
How to "make friends" TestContainers Webdriver Containers and ParameterizedTest (JUnit5)
I have a problem with running @ParameterizedTest via TestContainers.
@Test running via TestContainers, but as soon as I change to @ParameterizedTest, then everything starts running on my local Сhrome instance.
In TestContainers's documentation I…

LenaVasileva
- 3
- 1
0
votes
1 answer
Testcontainers: build docker image inside testcontainer
I'm creating some tests for my CI/CD service with testcontainers.
One of the tests contains docker image building inside the testcontainer. It fails as it cannot access docker daemon.
The question is how to share local docker daemon to testcontainer…

ArtemZip
- 19
- 4
0
votes
1 answer
Inject implementation of CassandraRepository in Spring Boot test
I am using Spring Boot and Spring Data Cassandra in my webflux application. I have issue when I do integration test with docker by using testcontainer, Spring doesn't inject the implementation of my cassandra repository in my tests but it always…

Barcelona
- 2,122
- 4
- 21
- 42
0
votes
1 answer
Connect my Oraclecontainer to an external database (not localhost) for integration tests Java/ Springboot
I want to change my integration tests (use oracle 19c database) by using testcontainers.
So installed docker in local and run the Docker Desktop.
after i used the image gvenzl/oracle-xe:18.4.0-slim and i run it locally.
After in my code (java &…

taher ben abdallah
- 85
- 2
- 9
0
votes
1 answer
Springboot cannot connect to postgresql using testcontainers on Jenkins CI/CD pipeline
I am using springboot which is internally use Hikari connection pool.
I am running my database integration test using testcontainers,And which is working completely fine on local machine.
But when I run same test on Jenkins CI/CD pipeline, it fail…

Alpesh Jikadra
- 1,692
- 3
- 18
- 38