-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced Testcontainers Support #112
Comments
Hi @ibmmqmet, I forked the repository and had a go at implementing a very rudimentary PoC (see mbechto@30768a3), but maybe that gives an idea of the changes in order to achieve this. These are:
I have added an integration test to further illustrate the use case: https://github.com/mbechto/mq-jms-spring/blob/30768a386c7ca9436d49da3b3260d000e44788ee/mq-jms-spring-boot-starter/src/test/java/com/ibm/mq/spring/boot/TestcontainersTest.java Caveats
|
Hi, spring boot 3.1 should be required in order to support ConnectionDetails and ServiceConnection |
Hi @eddumelendez, thanks for the heads up! That's right. As I pointed out in my caveats section, the PoC I wrote does not support Spring 2 due to what you mentioned. So that poses a problem, which is one reason why I didn't create a PR from my fork yet. |
Thanks for raising this. It looks like it might be interesting. I plan to dig deeper into it when I get some time. Without looking at all yet, one thing I want to be wary of is any bloat in the dependency chains. |
We were trying to use the mq-container with Spring Boot 3.x Testcontainers with
@ServiceConnection
similar to what you can do with a PostgreSQL container:Our intention is to avoid unnecessary container restarts between
@SpringBootTest
s as that slows down the testing process significantly therefore@RestartScope
. Maybe more importantly@ServiceConnection
configures the correct connection properties, since Testcontainers exposes services on a random port (by default) this is crucial. So similar to PostgreSQL, we tried something like this:Resulting in the following error on startup:
After some debugging through Spring code, I guess this would require some integration to make it work, e.g. implementing some classes similar to the ActiveMQ Testcontainers integration.
The text was updated successfully, but these errors were encountered: