Skip to content

Commit bfffe46

Browse files
committed
WIP, reverse change to not make changes in initial intercept
1 parent 8fd89de commit bfffe46

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

test-framework/junit5-config/src/main/java/io/quarkus/test/config/TestConfigProviderResolver.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public Config getConfig(final LaunchMode mode) {
5454
SmallRyeConfig config = configs.computeIfAbsent(mode, new Function<LaunchMode, SmallRyeConfig>() {
5555
@Override
5656
public SmallRyeConfig apply(final LaunchMode launchMode) {
57-
System.out.println((("HOLLY wull build, iam " + this.getClass()
57+
System.out.println((("HOLLY wull apply config, iam " + this.getClass()
5858
.getClassLoader() + " tccl"
5959
+ Thread.currentThread()
6060
.getContextClassLoader()

test-framework/junit5/src/main/java/io/quarkus/test/junit/classloading/FacadeClassLoader.java

+1
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ public FacadeClassLoader(ClassLoader parent, boolean isAuxiliaryApplication, Cur
230230
@Override
231231
public Class<?> loadClass(String name) throws ClassNotFoundException {
232232
Log.debugf("Facade classloader loading %s", name);
233+
System.out.println("HOLLY loading " + name);
233234

234235
if (peekingClassLoader == null) {
235236
throw new RuntimeException("Attempted to load classes with a closed classloader: " + this);

test-framework/junit5/src/main/java/io/quarkus/test/junit/launcher/CustomLauncherInterceptor.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public <T> T intercept(Invocation<T> invocation) {
4040
// some for creation of Launcher instances, and some for calls to Launcher.discover(LauncherDiscoveryRequest), Launcher.execute(TestPlan, TestExecutionListener...), and Launcher.execute(LauncherDiscoveryRequest, TestExecutionListener...)
4141
// We only know why it was called *after* calling invocation.proceed, sadly
4242
// The Gradle classloading seems to happen immediately after the ConfigSessionListener is triggered, but before the next launch invocation
43-
//adjustContextClassLoader();
43+
adjustContextClassLoader();
4444
// }
4545

4646
return answer;
@@ -65,6 +65,7 @@ private void initializeFacadeClassLoader() {
6565

6666
@Override
6767
public void launcherDiscoveryStarted(LauncherDiscoveryRequest request) {
68+
System.out.println("HOLLY WAHOO discpvery started TCCL check" + Thread.currentThread().getContextClassLoader());
6869
// Do not do any classloading dance for prod mode tests;
6970
// We're too early for config to be available, so just check the system props
7071
if (!isProductionModeTests()) {
@@ -74,6 +75,7 @@ public void launcherDiscoveryStarted(LauncherDiscoveryRequest request) {
7475
}
7576

7677
private void adjustContextClassLoader() {
78+
System.out.println("HOLLY adjust TCCL CHECK" + Thread.currentThread().getContextClassLoader());
7779
ClassLoader currentCl = Thread.currentThread().getContextClassLoader();
7880
// Be aware, this method might be called more than once, for different kinds of invocations; especially for Gradle executions, the executions could happen before the TCCL gets constructed and set by JUnitTestRunner
7981
// We might not be in the same classloader as the Facade ClassLoader, so use a name comparison instead of an instanceof

0 commit comments

Comments
 (0)