snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Native Tests fail when quarkus.http.test-port is set to 0 #168

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 4 years ago

Describe the bug

When running a native test with quarkus.http.test-port=0 you get the following :

[INFO] Running org.acme.NativeExampleResourceIT
Executing target/code-with-quarkus-1.0.0-SNAPSHOT-runner, -Dquarkus.http.port=0, -Dquarkus.http.ssl-port=8444, -Dtest.url=http://localhost:0

The runner is executed with localhost:0 (instead of a random port). So it hangs, and then the test fails with:

Caused by: java.lang.RuntimeException: Unable to start native image in 60s

Expected behavior

The test should pass using a random port (like JVM mode tests).

Actual behavior

To Reproduce Steps to reproduce the behavior:

  1. Go to code.quarkus.io and generate a new project
  2. mvn verify -Pnative works
  3. Add the property quarkus.http.test-port=0to the application.properties file
  4. mvn verify -Pnative FAILS

Configuration

quarkus.http.test-port=0

Environment (please complete the following information):

Additional context (Add any other context about the problem here.)


https://github.com/quarkusio/quarkus/issues/11891


$upstream:11891$