diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index 5acc5e25034549..9f2337941880c8 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -138,7 +138,7 @@
11.5.8.0
1.2.6
5.3.0
- 5.9.3
+ 5.10.0
1.5.0
14.0.11.Final
4.6.2.Final
diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/CoreQuarkusTestExtension.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/CoreQuarkusTestExtension.java
index 8d85ff1ba81852..ca9d10545bfcc7 100644
--- a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/CoreQuarkusTestExtension.java
+++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/CoreQuarkusTestExtension.java
@@ -57,8 +57,6 @@ public class CoreQuarkusTestExtension {
protected static final String TEST_LOCATION = "test-location";
protected static final String TEST_CLASS = "test-class";
- protected static Class currentJUnitTestClass;
-
/// end copied
private static final Logger log = Logger.getLogger(CoreQuarkusTestExtension.class);
@@ -94,10 +92,17 @@ public PrepareResult(AugmentAction augmentAction, QuarkusTestProfile profileInst
}
}
- // Re-used from AbstractJvmQuarkusTestExtension
protected PrepareResult createAugmentor(Class requiredTestClass, Class extends QuarkusTestProfile> profile,
Collection shutdownTasks) throws Exception {
+ Path testClassLocation = getTestClassesLocation(requiredTestClass);
+ return createAugmentor(testClassLocation, profile, shutdownTasks);
+ }
+
+ // Re-used from AbstractJvmQuarkusTestExtension
+ protected PrepareResult createAugmentor(Path testClassLocation, Class extends QuarkusTestProfile> profile,
+ Collection shutdownTasks) throws Exception {
+
// I think the required test class is just an example, since the augmentor is only
// created once per test profile
final PathList.Builder rootBuilder = PathList.builder();
@@ -108,9 +113,6 @@ protected PrepareResult createAugmentor(Class requiredTestClass, Class extends
}
};
- currentJUnitTestClass = requiredTestClass;
-
- final Path testClassLocation;
final Path appClassLocation;
final Path projectRoot = Paths.get("")
.normalize()
@@ -175,7 +177,7 @@ protected PrepareResult createAugmentor(Class requiredTestClass, Class extends
}
}
- testClassLocation = getTestClassesLocation(requiredTestClass);
+ // testClassLocation = getTestClassesLocation(requiredTestClass);
System.out.println("test class location is " + testClassLocation);
appClassLocation = getAppClassLocationForTestLocation(testClassLocation.toString());
System.out.println("app class location is " + appClassLocation);
@@ -279,7 +281,7 @@ protected PrepareResult createAugmentor(Class requiredTestClass, Class extends
.isAuxiliaryApplication());
final Map props = new HashMap<>();
props.put(TEST_LOCATION, testClassLocation);
- props.put(TEST_CLASS, requiredTestClass);
+ // TODO surely someone reads this? props.put(TEST_CLASS, requiredTestClass);
// TODO what's going on here with the profile?
Class extends QuarkusTestProfile> quarkusTestProfile = profile;
PrepareResult result = new PrepareResult(curatedApplication
@@ -301,7 +303,8 @@ public ClassLoader doJavaStart(Class testClass, CuratedApplication curatedApplic
QuarkusTestProfile profileInstance = result.profileInstance;
testHttpEndpointProviders = TestHttpEndpointProvider.load();
- System.out.println("CORE MAKER SEES CLASS OF STARTUP " + StartupAction.class.getClassLoader());
+ System.out.println(
+ "CORE MAKER SEES CLASS OF STARTUP " + StartupAction.class.getClassLoader());
System.out.println("HOLLY about to make app for " + testClass);
StartupAction startupAction = augmentAction.createInitialRuntimeApplication();
@@ -312,6 +315,27 @@ public ClassLoader doJavaStart(Class testClass, CuratedApplication curatedApplic
}
+ public ClassLoader doJavaStart(Path location, CuratedApplication curatedApplication) throws Exception {
+ Class extends QuarkusTestProfile> profile = null;
+ // TODO do we want any of these?
+ Collection shutdownTasks = new HashSet();
+ PrepareResult result = createAugmentor(location, profile, shutdownTasks);
+ AugmentAction augmentAction = result.augmentAction;
+ QuarkusTestProfile profileInstance = result.profileInstance;
+
+ testHttpEndpointProviders = TestHttpEndpointProvider.load();
+ System.out.println(
+ "CORE MAKER SEES CLASS OF STARTUP " + StartupAction.class.getClassLoader());
+
+ System.out.println("HOLLY about to make app for " + location);
+ StartupAction startupAction = augmentAction.createInitialRuntimeApplication();
+ // TODO this seems to be safe to do because the classloaders are the same
+ startupAction.store();
+ System.out.println("HOLLY did store " + startupAction);
+ return startupAction.getClassLoader();
+
+ }
+
// TODO can we defer this and move it back to the junit5 module?
public static class TestBuildChainFunction implements Function