Closed sorin-costea closed 2 years ago
/cc @stuartwdouglas
I think the mock server for Lambda is different from devservices. That's why disabling dev services doesn't change a thing for you.
The class starting the mock server is called "DevServicesLambdaProcessor.java" so it sounds like a devservice. But anyway, that class doesn't seem to care about any setting, it will start the mock server every time. I guess it's by design so, even though I can't see the reason for that. Also by design it uses the same default port as Quarkus dev itself 8081 so it will clash by design (luckily at least you can change that port after you get the first errors). Maybe @stuartwdouglas can enlighten us, as the bot suggested? :) Thank you!
cc @patriot1burke
What is your use case for having both lambda and the normal Quarkus HTTP stack? In general they are mutually exclusive. If you are trying to handle HTTP requests in lambda it is not a normal HTTP request flow, the mock server lets you use a browser or other HTTP based tool (such as Restassured in tests) to test Lambda using normal HTTP (by basically acting like the lambda runtime).
@stuartwdouglas DevServicesLambdaProcessor does not check quarkus.devservices.enabled=false
I need to add:
@BuildStep(onlyIf = GlobalDevServicesConfig.Enabled.class)
@stuartwdouglas I get this during the unit tests, where I don't need the lambda mock (nor http requests, actually). Maybe I think differently about what is "unit tests"?
@stuartwdouglas DevServicesLambdaProcessor does not check quarkus.devservices.enabled=false
I need to add:
@BuildStep(onlyIf = GlobalDevServicesConfig.Enabled.class)
@stuartwdouglas Any plan to add this at some point?
Describe the bug
quarkus.devservices.enabled=false in src/main/resources/application.properties I start a
mvn test
and get this log:Expected behavior
I didn't expect to have a Lambda mock started as the mocks were supposedly disabled.
Actual behavior
No response
How to Reproduce?
Reproducer here: https://github.com/sorin-costea/qtest Run it as you wish, from maven or from an IDE, same results.
Output of
uname -a
orver
Microsoft Windows [Version 10.0.19044.1645]
Output of
java -version
openjdk version "11.0.10" 2021-01-19 LTS OpenJDK Runtime Environment Corretto-11.0.10.9.1 (build 11.0.10+9-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.10.9.1 (build 11.0.10+9-LTS, mixed mode)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.8.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
Also the log output is weird but that's another story...