I am building a maven project with Kotlin and Quarkus. I splitted unit and integration tests so I have a structure like :
src/integration-test/-> where I annotate classes with@QuarkusIntegrationTestmain/test/-> where I annotate classes with@QuarkusTest
I have an issue when trying to run all tests in integration-test (with mvn failsafe command, or with intelliJ). All the tests inside the first test class pass, but then the application fails to start before running tests of the second test class, stating that application port is already in use:
io.quarkus.runtime.QuarkusBindException: Port(s) already bound: 8081: Address already in use
When running each test class separately, all tests pass.
I have tried setting test-port: 0 in my application.yml, but I get the same error with the random port. Is there a way to tell quarkus to keep the same app instance for all integration test class ? Or to check that the first one has teminated completely before running the next class ? I don't know what I am doing wrong with this @QuarkusIntegrationTest annotation.
Thanks in advance for the help.