question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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):

  • Output of uname -a or ver: 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 or gradlew --version): 3.6.3_1

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
tisoftcommented, Sep 10, 2020

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.

1reaction
famodcommented, Sep 4, 2020

/cc @geoand

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found