From 8a7897a9e55e4c26c515e5296dd8b199d52ce796 Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Thu, 16 Sep 2021 08:56:12 +1000 Subject: [PATCH] Add test resources dir to CP Fixes #20179 --- .../io/quarkus/deployment/dev/testing/TestSupport.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestSupport.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestSupport.java index 1e65b09d07823..fd85de6413ba6 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestSupport.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestSupport.java @@ -2,10 +2,11 @@ import java.nio.file.Path; import java.nio.file.Paths; -import java.util.ArrayList; import java.util.Collections; +import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; +import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import java.util.regex.Pattern; @@ -121,8 +122,11 @@ public void init() { } if (testCuratedApplication == null) { try { - List paths = new ArrayList<>(); + Set paths = new LinkedHashSet<>(); paths.add(Paths.get(context.getApplicationRoot().getTest().get().getClassesPath())); + if (context.getApplicationRoot().getTest().get().getResourcesOutputPath() != null) { + paths.add(Paths.get(context.getApplicationRoot().getTest().get().getResourcesOutputPath())); + } paths.addAll(curatedApplication.getQuarkusBootstrap().getApplicationRoot().toList()); testCuratedApplication = curatedApplication.getQuarkusBootstrap().clonedBuilder() .setMode(QuarkusBootstrap.Mode.TEST)