@@ -221,6 +221,7 @@ public Thread newThread(Runnable r) {
221
221
222
222
testHttpEndpointProviders = TestHttpEndpointProvider .load ();
223
223
StartupAction startupAction = augmentAction .createInitialRuntimeApplication ();
224
+ System .out .println ("HOLLY startup classloader is " + startupAction .getClassLoader ());
224
225
Thread .currentThread ().setContextClassLoader (startupAction .getClassLoader ());
225
226
populateDeepCloneField (startupAction );
226
227
@@ -355,6 +356,7 @@ private void shutdownHangDetection() {
355
356
}
356
357
357
358
private void populateDeepCloneField (StartupAction startupAction ) {
359
+ System .out .println ("HOLLY making deep cloner" );
358
360
deepClone = new SerializationWithXStreamFallbackDeepClone (startupAction .getClassLoader ());
359
361
}
360
362
@@ -373,6 +375,7 @@ private void populateTestMethodInvokers(ClassLoader quarkusClassLoader) {
373
375
374
376
@ Override
375
377
public void beforeTestExecution (ExtensionContext context ) throws Exception {
378
+ System .out .println ("HOLLY before test exevcution" + context .getRequiredTestClass ().getClassLoader ());
376
379
if (isNativeOrIntegrationTest (context .getRequiredTestClass ()) || isBeforeTestCallbacksEmpty ()) {
377
380
return ;
378
381
}
@@ -392,6 +395,7 @@ public void beforeTestExecution(ExtensionContext context) throws Exception {
392
395
393
396
@ Override
394
397
public void beforeEach (ExtensionContext context ) throws Exception {
398
+ System .out .println ("HOLLY before each" + context .getRequiredTestClass ().getClassLoader ());
395
399
if (isNativeOrIntegrationTest (context .getRequiredTestClass ())) {
396
400
return ;
397
401
}
@@ -644,6 +648,7 @@ private void throwBootFailureException() {
644
648
645
649
@ Override
646
650
public void beforeAll (ExtensionContext context ) throws Exception {
651
+ System .out .println ("HOLLY before all" + context .getRequiredTestClass ().getClassLoader ());
647
652
GroovyClassValue .disable ();
648
653
currentTestClassStack .push (context .getRequiredTestClass ());
649
654
//set the right launch mode in the outer CL, used by the HTTP host config source
@@ -689,6 +694,8 @@ public void interceptBeforeAllMethod(Invocation<Void> invocation, ReflectiveInvo
689
694
invocation .proceed ();
690
695
return ;
691
696
}
697
+
698
+ System .out .println ("HOLLY HI Bintercept bEFORE ALL " + invocationContext .getTargetClass ().getClassLoader ());
692
699
resetHangTimeout ();
693
700
ensureStarted (extensionContext );
694
701
if (failedBoot ) {
@@ -916,6 +923,7 @@ private Object runExtensionMethod(ReflectiveInvocationContext<Method> invocation
916
923
917
924
ClassLoader old = setCCL (runningQuarkusApplication .getClassLoader ());
918
925
try {
926
+ System .out .println ("HOLLY the actual test class is " + extensionContext .getRequiredTestClass ().getClassLoader ());
919
927
Class <?> testClassFromTCCL = Class .forName (extensionContext .getRequiredTestClass ().getName (), true ,
920
928
Thread .currentThread ().getContextClassLoader ());
921
929
Map <Class <?>, Object > allTestsClasses = new HashMap <>();
@@ -963,6 +971,7 @@ private Object runExtensionMethod(ReflectiveInvocationContext<Method> invocation
963
971
boolean cloneRequired = false ;
964
972
Object replacement = null ;
965
973
Class <?> argClass = parameters [i ].getType ();
974
+ System .out .println ("HOLLY checking clone on " + argClass + "<-" + argClass .getClassLoader ());
966
975
if (arg != null ) {
967
976
Class <?> theclass = argClass ;
968
977
while (theclass .isArray ()) {
@@ -982,6 +991,8 @@ private Object runExtensionMethod(ReflectiveInvocationContext<Method> invocation
982
991
cloneRequired = true ;
983
992
} else {
984
993
try {
994
+ System .out .println ("comparing " + theclass .getClassLoader () + " vs "
995
+ + runningQuarkusApplication .getClassLoader ());
985
996
cloneRequired = runningQuarkusApplication .getClassLoader ()
986
997
.loadClass (theclass .getName ()) != theclass ;
987
998
} catch (ClassNotFoundException e ) {
@@ -997,7 +1008,9 @@ private Object runExtensionMethod(ReflectiveInvocationContext<Method> invocation
997
1008
if (replacement != null ) {
998
1009
argumentsFromTccl .add (replacement );
999
1010
} else if (cloneRequired ) {
1000
- argumentsFromTccl .add (deepClone .clone (arg ));
1011
+ // argumentsFromTccl.add(deepClone.clone(arg));
1012
+ argumentsFromTccl .add (arg );
1013
+ System .err .println ("HOLLY NOT DOING CLONE" );
1001
1014
} else if (testMethodInvokerToUse != null ) {
1002
1015
argumentsFromTccl .add (testMethodInvokerToUse .getClass ().getMethod ("methodParamInstance" , String .class )
1003
1016
.invoke (testMethodInvokerToUse , argClass .getName ()));
0 commit comments