-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
The bug is regarding devservice lifecycle when running tests having multiple test profiles.
When starting all tests using N TestProfile all containers will be started N times at startup.
Let say an application have 5 test profiles with a Postgres devservice, running all tests will produces at startup 10 containers : 5 ruyk and 5 Postgres.
In my scenario I do not reuse container.
Expected behavior
It should be likes it was before 3.22
Before the version 3.22 only one Postgres container will be used at once (and one ryuk will be created each time a test profile is started). At the end of the tests we will have 5 ruyk containers and only one last Postgres.
Actual behavior
When I start all tests I will have a lot of containers belonging to each test profile.
How to Reproduce?
My reproducer is a rest greeting application with a dependency to quarkus-jdbc-postgresql with two tests: one without testprofile and one with a testprofile.
- git clone https://github.com/dcdh/code-with-quarkus-sample-testprofile.git (it uses quarkus version 3.22.1)
- execute "mvn clean install"
- You will obtains this
- The tests will be executed after all four containers creation
- Previous behavior change the version from 3.22.1 to 3.21.4 in the pom.xml
- relaunch the tests
You will have this regarding the execution of first test
You will have this regarding the execution of the second test
A new Postgres instance is created and is in used. Previous one has been deleted.
Output of uname -a or ver
Linux 2a02-8428-dff8-c601-630e-0af7-4e92-5192.rev.sfr.net 6.16.10-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Oct 2 19:23:55 UTC 2025 x86_64 GNU/Linux
Output of java -version
openjdk version "21.0.8" 2025-07-15 OpenJDK Runtime Environment (Red_Hat-21.0.8.0.9-1) (build 21.0.8+9) OpenJDK 64-Bit Server VM (Red_Hat-21.0.8.0.9-1) (build 21.0.8+9, mixed mode, sharing)
Quarkus version or git rev
3.22.1+
Build tool (ie. output of mvnw --version or gradlew --version)
Apache Maven 3.9.9 (Red Hat 3.9.9-14)
Additional information
https://quarkus.io/blog/quarkus-3-22-1-released/
The sample is very simple. On some of my project I can have 10 TestProfiles with Oracle + Vault + Artemis ...
It can create 50 containers at start in initialization before running the tests. And it fails because I do not have enough resources.
Regards,
Damien