Describe the bug
@TestProfile doesn't fully reset the environment in a way that @TestHTTPResource would work with random ports (ie set with quarkus.http.test-port=0 ). This might be a CDI issue?
Expected behavior
If you create more than 1 test which relies on @TestHTTPResource and @TestProfile with random ports. I would expect each test to be able to run with a new random port and a new CDI injection for each object, and the HTTP server to be brought up correctly.
I would expect the URL to always point to the current server, and work regardless how many tests I have.
Actual behavior
After running the first test the HTTP server isn't accessible using the injected URL for the endpoint. Perhaps it's running on a different port. But I wouldn't know.
# Add your application.properties here, if applicable.
# https://quarkus.io/guides/config
quarkus.banner.enabled=false
%test.quarkus.http.test-port=0
%test.quarkus.http.test-ssl-port=0
Screenshots
n/a
Environment (please complete the following information):
Output of uname -a or ver:
Microsoft Windows [Version 10.0.19041.450]
Output of java -version:
\quarkusrandomportprofiletestsissue>java --version
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02)
OpenJDK 64-Bit Server VM GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02, mixed mode, sharing)
- GraalVM version (if different from Java):
``` GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02)```
- Quarkus version or git rev:
``` <quarkus.version>1.7.0.Final</quarkus.version>
Build tool (ie. output of mvnw --version or gradlew --version):
Describe the bug @TestProfile doesn't fully reset the environment in a way that @TestHTTPResource would work with random ports (ie set with quarkus.http.test-port=0 ). This might be a CDI issue?
Expected behavior If you create more than 1 test which relies on @TestHTTPResource and @TestProfile with random ports. I would expect each test to be able to run with a new random port and a new CDI injection for each object, and the HTTP server to be brought up correctly.
I would expect the URL to always point to the current server, and work regardless how many tests I have.
Actual behavior After running the first test the HTTP server isn't accessible using the injected URL for the endpoint. Perhaps it's running on a different port. But I wouldn't know.
To Reproduce Steps to reproduce the behavior:
Configuration
Screenshots n/a
Environment (please complete the following information):
uname -a
orver
:Microsoft Windows [Version 10.0.19041.450]
java -version
:mvnw --version
orgradlew --version
):Additional context
https://github.com/quarkusio/quarkus/issues/11688
$upstream:11688$