Questions tagged [testcontainers-junit5]

89 questions
0
votes
1 answer

Test containers: manipulate existing docker compose services

I'm using Maven pre-integration-tests and post-integration tests to setup and tear down a test environment with three services (say A, B and C) Is it possible using Test containers to restart one of those services before a test? If not, can I do…
italktothewind
  • 1,950
  • 2
  • 28
  • 55
0
votes
0 answers

TestContainers cannot connect to opened ports

In one of my tests using testcontainers, the container failed to start and the log is: [ERROR] 17:31:38,814 [Test worker] 1.1]. - Could not start container org.testcontainers.containers.ContainerLaunchException: Timed out waiting for…
McXD
  • 27
  • 1
  • 8
0
votes
1 answer

Reusing Testcontainers OracleContainer

It is possible to have the testcontainers.reuse.enable config on project testcontainers.properties instead of having on my user root folder?
John
  • 1,697
  • 4
  • 27
  • 53
0
votes
1 answer

Testcontainers oracle DB

I'm trying to setup a integration test Using Testcontainers and Oracle-xe database. I'm getting the error below: application.properties entry:spring.datasource.driver-class-name=org.testcontainers.jdbc.ContainerDatabaseDriver Driver…
John
  • 1,697
  • 4
  • 27
  • 53
0
votes
1 answer

@Convert not considered in maven integration test

I have a simple LocalDateTime - Timestamp - Converter used in an @Entity like following: @Converter(autoApply = true) public class TimestampConverter implements AttributeConverter { @Override public Timestamp…
Arno
  • 308
  • 3
  • 10
0
votes
2 answers

Testcontainers: Synchronizing on Logs after the Service Was Ready

I'm developing some component tests using Testcontainers. I can synchronize the tests on service readiness. However, once the service is ready, I need to prepare the fixture and run the tests until the fixture is fully loaded. The container under…
riccardo.cardin
  • 7,971
  • 5
  • 57
  • 106
0
votes
1 answer

Spring JUnit 5 ExtendWith TestContainer

I'm trying to reutilize a container and I'm trying to use JUnit5 ExtendWith feature but I'm still getting: Connection to localhost:5432 refused. If I have the same logic inside each test everything works as…
John
  • 1,697
  • 4
  • 27
  • 53
0
votes
1 answer

I'd like configure IndefiniteWaitOneShotStartupCheckStrategy by properties, not using Java class on testcontainer

I need use "Indefinite one shot startup strategy example" by testcontainer.properties. How could I configure IndefiniteWaitOneShotStartupCheckStrategy using properties? For real, I'd like to configure this three examples by properties, but I don't…
Clayton K. N. Passos
  • 1,292
  • 12
  • 15
0
votes
1 answer

Running SpringBootTest Context Without Testcontainers Launch

I have 2 parent test classes: @SpringBootTest(properties = { "spring.datasource.url=jdbc:tc:mysql:8.0.25:///my_test_db?TC_INITSCRIPT=db/init_mysql.sql", …
0
votes
1 answer

Howto use testcontainers with bnd

I'm new to bndtools. I'd like to use testcontainers (https://www.testcontainers.org/) to test a osgi bundle which is supposed to connect to a MQTT broker. So I can test connect, connectionlost etc. strategies. I dont't understand how maven and bnd…
Lbro
  • 309
  • 2
  • 16
0
votes
0 answers

Mocking a service in a Testcontainer Spring boot test

I am quite new in Spring and I am facing an issue right now with testing: I have the following Service: @Service public class MyService { public Integer getKey() { List keys = getKeys(1); if (keys.size() == 1) { return…
0
votes
1 answer

No such image: testcontainers/byvren8fgzpzaxgy:latest

When I tried to write the integration test for the Kafka container I get this error after trying to build the project. I have no idea what is going wrong. 22:46:01.464 [Thread-4] WARN o.t.utility.ResourceReaper - Unable to delete image…
0
votes
1 answer

How to clear test environment TestContainer in Quarkus

I'm struggling to remove all data persisted in a Container using TestContainers. I'm able to create and retrieve data from MongoDB Test Container, but each test case should be self contained, and one test shouldn't affect another one. If I'm not…
Johnnes Souza
  • 361
  • 1
  • 8
  • 22
-1
votes
1 answer

TestContainers - create GenericContainer and get the uri/path

I'am trying to create isolated test env using TestContainers (for database - postgresql and external services - for example authorising service). My question is, how can i set path in application.yml/application.properties to these external…
user17885178
1 2 3 4 5
6