Container reuse across r2dbc:tc and jdbc:tc URLs
See original GitHub issueCould you please enable container reusage across r2dbc and jdbc urls?
Use case (in Spring Boot):
spring:
r2dbc:
url: r2dbc:tc:postgresql:///test?TC_IMAGE_TAG=12-alpine
flyway:
url: jdbc:tc:postgresql:12-alpine:///test
https://github.com/testcontainers/testcontainers-java/issues/4282
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How to reuse a `testcontainers` container with two different ...
1 Answer 1 ... When you use Testcontainers' JDBC support, which you configure by adding tc in the jdbc url, the lifecycle of...
Read more >Getting Started | Accessing data with R2DBC - Spring
This guide walks you through the process of building an application that uses Spring Data R2DBC to store and retrieve data in a...
Read more >Reusable Containers (Experimental) - Testcontainers for Java
In order to reuse a container, the configuration of the container must not change. ... Reusable Container with Testcontainers JDBC URL.
Read more >Reactive Relational Database Connectivity - R2DBC
constants through ConnectionFactories. Additional options identifiers are created through Option.valueOf(…).. Note that Connection URL Parsing cannot ...
Read more >Testcontainers With Kotlin and Spring Data R2DBC - DZone
Here we make sure to override our R2DBC connection properties in runtime with the ones pointing to our newly created container. Java. @JvmStatic ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

HI @yerzhant,
thanks for raising this issue and brining it to our attention, this is indeed a very interesting feature. However, implementation might be a bit more involved, so I can’t promise when we will have time to work on this.
Contributions by the community exploring possible implementations are welcome.
I think for JDBC this works by appending ?&TC_REUSABLE=true. I’m using the following:
Would be good to adjust the documentation accordingly if this is indeed intentional 😸