This is an automated email from the ASF dual-hosted git repository. ppalaga pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push: new 125a6b2ed6 Add a note to the contributor guide about keeping junit & Co. in Maven test scope 125a6b2ed6 is described below commit 125a6b2ed6633ce1aa8bc3f03fc4e32dc8248736 Author: Peter Palaga <ppal...@redhat.com> AuthorDate: Wed Jul 12 16:19:39 2023 +0200 Add a note to the contributor guide about keeping junit & Co. in Maven test scope --- docs/modules/ROOT/pages/contributor-guide/extension-testing.adoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/contributor-guide/extension-testing.adoc b/docs/modules/ROOT/pages/contributor-guide/extension-testing.adoc index c7cac36906..c539a8e22b 100644 --- a/docs/modules/ROOT/pages/contributor-guide/extension-testing.adoc +++ b/docs/modules/ROOT/pages/contributor-guide/extension-testing.adoc @@ -54,12 +54,17 @@ If you want to add just a new test module for an existing extension, == Minimal set of dependencies -Keeping the set of test module dependencies as small as possible has two main advantages: +Keeping the set of test module dependencies as small as possible has several advantages: * Less code is faster to compile to native image * Additional code may introduce some side effects, mainly in native compilation. For instance, an extension A may configure the native compiler in such a way that it causes also extension B to work properly in native mode. However, if B was tested in isolation, it would not work. +* This rule also applies to `junit`, `testcontainers`, `rest-assured`, `assertj` and similar testing dependencies: + Unless there is some really good reason to do the opposite, they should be kept in Maven `test` scope. + Having them in the `compile` or `runtime` scope makes them analyzed and possibly compiled by GraalVM + when the tests are run in native mode. + On one hand, it makes the native compilation slower and on the other hand, those testing artifacts may cause native compilation issues. == Grouping