-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Quarkus Platform should not ban test scope in endorsed third party test projects #3136
Comments
@aloubyansky does the removal of the test scope eventually impact the build time as test dependencies leak into the compile classpath ? |
Right, they will end up in the lib dir. |
That's a tricky one. The issue is that the test deps should be loadable by the surefire plugin. For that to work there are a few options:
Personally, I find 2 is worse than 1. Test artifacts are supposed to be used in the testsuite anyway. So, using anything but test scope shouldn't be a big deal. This is how maven dependency resolution works. The issue is not specific to Quarkus, it's how external tests are supposed to be integrated in general, afaiu. 3 is not nice by definition, although that depends on the impl, I guess. Here is a hack that appears to work:
I also tried another hack - modifying the surefire configuration using Maven API during the build which didn't work (I guess for good). |
The way I see it, the Maven way to import test JARs applied to Quarkus suggests separation of the test application (the app used in the tests) and the tests themselves by moving them into their own modules. So the test app would be developed in one module and the tests - in a different one which would depend on the test app artifact. |
Thanks for the analysis, @aloubyansky . Let me check if we can hack our build process to modify the test jars as you need. Because I do not like the idea to have separate test modules on our side, I'd write a piece of groovy that generates a pom.xml for the tests jar as-if in a separate module and installs/deploys it together with the test jar under the coordinates of the synthetic module. |
I'm a little worried to have a script to workaround this issue on an external extension side for a number of reasons:
A better solution would be to have support from the quarkus tooling side so each extension can just use it and what happens it controlled by quarkus so you can roll-out fixes or implement additional feature easily |
Thinking of it again, the generation of the POM for the synthetic tests module and installing it to the local maven repo [1] could be also run on the Quarkus side. That would indeed solve the problems named by @lburgazzoli above. WDYT, @aloubyansky ? |
Yes, quarkusio/quarkus-platform#7 is our proposal, how the current issue should be solved so closing this one. |
reopening as by accident issues were enabled on platform - no need to spread that thin across. here is comment from @ppalaga on latest progress with title "Run third party integration tests ": @aloubyansky agreed to try this proposal. cc @maxandersen Third party side:
Quarkus Platform side:
|
There was an adjustment in Quarkus 0.25.0 to allow the integrating the tests described above. |
This is a followup of apache/camel-quarkus#35 cc @lburgazzoli
Background: @aloubyansky 's proposal https://github.com/aloubyansky/moving-camel-out-of-quarkus/blob/master/it/camel-servlet/pom.xml#L26 how endorsed third party extension tests should look like bans
<scope>test</scope>
in integration test projects. This is motivated by the fact that @aloubyansky wants to be able to run these tests inside the planned Quarkus Platform build. Dependencies with<scope>test</scope>
would not be resolved properly there.We (camel-quarkus team) accepted the ban of test scope for now. However, we would not like this to be a definitive solution, because this makes our integration tests non-idiomatic and thus non-usable as quickstarts. It would be nice if Quarkus team could come with a solution that allows us keeping to use
<scope>test</scope>
in camel-quarkus.The text was updated successfully, but these errors were encountered: