Native Tests fail when quarkus.http.test-port is set to 0
See original GitHub issueDescribe 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:
- Go to code.quarkus.io and generate a new project
mvn verify -Pnative
works- Add the property
quarkus.http.test-port=0
to theapplication.properties
file mvn verify -Pnative
FAILS
Configuration
quarkus.http.test-port=0
Environment (please complete the following information):
- Output of
uname -a
orver
: Darwin iMac-Pro-de-Antonio.local 19.6.0 Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64 x86_64 - Output of
java -version
: java version “11.0.6” 2020-01-14 LTS - GraalVM version (if different from Java):
- Quarkus version or git rev: 1.7.1-FINAL
- Build tool (ie. output of
mvnw --version
orgradlew --version
): 3.6.3_1
Additional context (Add any other context about the problem here.)
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Testing Your Application - Quarkus
Learn how to test your Quarkus Application. This guide covers: Testing in JVM mode. Testing in native mode. Injection of resources into tests...
Read more >Continuous Testing - Quarkus
If you want continuous testing to start automatically you can set ... Test run failed, 2 tests were run, 1 failed, 0 were...
Read more >All configuration options - Quarkus
AWS Lambda Type Default
AWS Lambda Common Type Default
AWS Lambda Gateway REST API Type Default
Agroal ‑ Database connection pool Type Default
Read more >Quarkus Insights #1: Tests
Yeah, alright, so we're ready. We can share the screen of Georgios, but today we're going to talk about tests in Quarkus.
Read more >Configuration Reference Guide - Quarkus
In this reference guide we're going to describe various aspects of Quarkus configuration. ... quarkus.http.port=9090 %staging.quarkus.http.test-port=9091.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It fails everytime with my real test, but I haven’t been able to extract a minimal reproducer yet. Might be caused by extensions I’m using, or something funny in my test case. Will report back as soon as I have a reproducer, I can share.
/cc @geoand