Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random test port does not work together with amazon-lambda-http extension #23581

Closed
pawelmatras opened this issue Feb 10, 2022 · 4 comments · Fixed by #23798
Closed

Random test port does not work together with amazon-lambda-http extension #23581

pawelmatras opened this issue Feb 10, 2022 · 4 comments · Fixed by #23798
Labels
area/amazon-lambda kind/bug Something isn't working
Milestone

Comments

@pawelmatras
Copy link

pawelmatras commented Feb 10, 2022

Describe the bug

As soon as one adds implementation("io.quarkus:quarkus-amazon-lambda-http") dependency to Quarkus project RestAssured tests using random port (quarkus.http.test-port=0) start failing (invalid port 0).
Random port with lambda dependency worked until Quarkus 2.2.5.Final. All versions above fail (including latest 2.7.1.Final).
Attaching vanilla Quarkus project with failing test
qt.zip

gradle clean build will succeed with dependency removed (line 24), Quarkus downgraded to 2.2.5.Final (line 11 and 19) or changing dependency type to runtimeOnly and excluding quarkus-security. None is an option for real project though.

Expected behavior

Random port is set correctly for RestAssured and attached test succeeds.

Actual behavior

RestAssured.port stays 0 and test fails.

How to Reproduce?

Run gradle clean build on attached source code.

Output of uname -a or ver

Linux 5.13.0-28-generic #31~20.04.1-Ubuntu SMP Wed Jan 19 14:08:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.10" 2021-01-19 LTS

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.3.0 until now

Build tool (ie. output of mvnw --version or gradlew --version)


Gradle 7.2

Build time: 2021-08-17 09:59:03 UTC
Revision: a773786b58bb28710e3dc96c4d1a7063628952ad

Kotlin: 1.5.21
Groovy: 3.0.8
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 11.0.10 (Amazon.com Inc. 11.0.10+9-LTS)
OS: Linux 5.13.0-28-generic amd64

Additional information

No response

@pawelmatras pawelmatras added the kind/bug Something isn't working label Feb 10, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 10, 2022

/cc @matejvasek, @patriot1burke

@patriot1burke
Copy link
Contributor

Why do you need to use a random test port? Just curious? Conflicting ports?

@pawelmatras
Copy link
Author

pawelmatras commented Feb 17, 2022

Mainly in order to run integration tests in parallel for 5 times shorter test times.
It (running tests in parallel) also helps with unit tests although not as significant as with integration tests.

@patriot1burke
Copy link
Contributor

PR will allow setting quarkus.lambda.mock-event-server.test-port to 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/amazon-lambda kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants