@@ -34,7 +34,7 @@ public class CustomLauncherInterceptor implements LauncherInterceptor {
34
34
public CustomLauncherInterceptor () throws Exception {
35
35
System .out .println ("HOLLY interceipt construct" + getClass ().getClassLoader ());
36
36
ClassLoader parent = Thread .currentThread ()
37
- .getContextClassLoader ();
37
+ .getContextClassLoader ();
38
38
System .out .println ("HOLLY CCL is " + parent );
39
39
40
40
customClassLoader = parent ;
@@ -46,7 +46,7 @@ public <T> T intercept(Invocation<T> invocation) {
46
46
// We visit this several times
47
47
System .out .println ("HOLLY interceipt doing" + invocation );
48
48
System .out .println ("HOLLY interceipt support is " + TestSupport .instance ()
49
- .isPresent ());
49
+ .isPresent ());
50
50
System .out .println ("HOLLY interceipt holder is " + StartupActionHolder .getStored ());
51
51
52
52
// This class sets a Thead Context Classloader, which JUnit uses to load classes.
@@ -69,13 +69,13 @@ public <T> T intercept(Invocation<T> invocation) {
69
69
if (invocation instanceof LauncherSession ) {
70
70
LauncherSession sess = (LauncherSession ) invocation ;
71
71
sess .getLauncher ()
72
- .registerLauncherDiscoveryListeners (new LauncherDiscoveryListener () {
73
- @ Override
74
- public void launcherDiscoveryStarted (LauncherDiscoveryRequest request ) {
75
- System .out .println ("YOYO discovery started " + request );
76
- LauncherDiscoveryListener .super .launcherDiscoveryStarted (request );
77
- }
78
- });
72
+ .registerLauncherDiscoveryListeners (new LauncherDiscoveryListener () {
73
+ @ Override
74
+ public void launcherDiscoveryStarted (LauncherDiscoveryRequest request ) {
75
+ System .out .println ("YOYO discovery started " + request );
76
+ LauncherDiscoveryListener .super .launcherDiscoveryStarted (request );
77
+ }
78
+ });
79
79
}
80
80
81
81
Thread currentThread = Thread .currentThread ();
@@ -98,8 +98,8 @@ public void launcherDiscoveryStarted(LauncherDiscoveryRequest request) {
98
98
99
99
System .out .println ("HOLLY before launch mode is " + LaunchMode .current ());
100
100
System .out .println ("HOLLY other way us " + ConfigProvider .getConfig ()
101
- .unwrap (SmallRyeConfig .class )
102
- .getProfiles ());
101
+ .unwrap (SmallRyeConfig .class )
102
+ .getProfiles ());
103
103
try {
104
104
System .out .println ("HOLLY interceipt original" + originalClassLoader );
105
105
CoreQuarkusTestExtension coreQuarkusTestExtension = new CoreQuarkusTestExtension ();
@@ -112,8 +112,8 @@ public void launcherDiscoveryStarted(LauncherDiscoveryRequest request) {
112
112
// TODO massi ve assumptions, completely ignoring multi module projects
113
113
// Assume the test class lives in the first element on the classpath
114
114
Path projectRoot = Paths .get ("" )
115
- .normalize ()
116
- .toAbsolutePath ();
115
+ .normalize ()
116
+ .toAbsolutePath ();
117
117
118
118
// TODO can we be more elegant about this? What about multi-module?
119
119
// TODO should we cross-reference against the classpath?
@@ -135,7 +135,7 @@ public void launcherDiscoveryStarted(LauncherDiscoveryRequest request) {
135
135
}
136
136
137
137
String [] ses = System .getProperty ("java.class.path" )
138
- .split (":" );
138
+ .split (":" );
139
139
for (String s : ses ) {
140
140
Path path = Paths .get (s );
141
141
if (path .normalize ()
@@ -165,34 +165,34 @@ public void launcherDiscoveryStarted(LauncherDiscoveryRequest request) {
165
165
System .out .println ("An alternate root we couuld do is " + projectRoot );
166
166
System .out .println (
167
167
"That gives gradlle " + getGradleAppModelForIDE (Paths .get ("" )
168
- .normalize ()
169
- .toAbsolutePath ()));
168
+ .normalize ()
169
+ .toAbsolutePath ()));
170
170
171
171
curatedApplication = QuarkusBootstrap .builder ()
172
- //.setExistingModel(gradleAppModel)
173
- // unfortunately this model is not
174
- // re-usable
175
- // due
176
- // to PathTree serialization by Gradle
177
- .setIsolateDeployment (true )
178
- .setMode (
179
- QuarkusBootstrap .Mode .TEST ) //
180
- // Even in continuous testing, we set
181
- // the mode to test - here, if we go
182
- // down this path we know it's normal mode
183
- // is this always right?
184
- .setTest (true )
185
-
186
- .setApplicationRoot (applicationRoot )
187
-
188
- // .setTargetDirectory(
189
- // PathTestHelper
190
- // .getProjectBuildDir(
191
- // projectRoot, testClassLocation))
192
- .setProjectRoot (projectRoot )
193
- // .setApplicationRoot(rootBuilder.build())
194
- .build ()
195
- .bootstrap ();
172
+ //.setExistingModel(gradleAppModel)
173
+ // unfortunately this model is not
174
+ // re-usable
175
+ // due
176
+ // to PathTree serialization by Gradle
177
+ .setIsolateDeployment (true )
178
+ .setMode (
179
+ QuarkusBootstrap .Mode .TEST ) //
180
+ // Even in continuous testing, we set
181
+ // the mode to test - here, if we go
182
+ // down this path we know it's normal mode
183
+ // is this always right?
184
+ .setTest (true )
185
+
186
+ .setApplicationRoot (applicationRoot )
187
+
188
+ // .setTargetDirectory(
189
+ // PathTestHelper
190
+ // .getProjectBuildDir(
191
+ // projectRoot, testClassLocation))
192
+ .setProjectRoot (projectRoot )
193
+ // .setApplicationRoot(rootBuilder.build())
194
+ .build ()
195
+ .bootstrap ();
196
196
197
197
// QuarkusClassLoader tcl = curatedApplication
198
198
// .createDeploymentClassLoader();
@@ -212,7 +212,7 @@ public void launcherDiscoveryStarted(LauncherDiscoveryRequest request) {
212
212
213
213
System .out .println ("HOLLY after launch mode is " + LaunchMode .current ());
214
214
final QuarkusBootstrap .Mode currentMode = curatedApplication .getQuarkusBootstrap ()
215
- .getMode ();
215
+ .getMode ();
216
216
ClassLoader loader = coreQuarkusTestExtension .doJavaStart (applicationRoot ,
217
217
curatedApplication );
218
218
currentThread .setContextClassLoader (loader );
@@ -230,10 +230,10 @@ public void launcherDiscoveryStarted(LauncherDiscoveryRequest request) {
230
230
} else {
231
231
// TODO should we be unsetting the classloader somewhere?
232
232
Thread .currentThread ()
233
- .setContextClassLoader (StartupActionHolder .getStored ()
234
- .getClassLoader ());
233
+ .setContextClassLoader (StartupActionHolder .getStored ()
234
+ .getClassLoader ());
235
235
System .out .println ("HOLLY NOW TCCL IS " + Thread .currentThread ()
236
- .getContextClassLoader ());
236
+ .getContextClassLoader ());
237
237
return invocation .proceed ();
238
238
}
239
239
}
0 commit comments