|
44 | 44 | import org.citrusframework.CitrusInstanceManager; |
45 | 45 | import org.citrusframework.CitrusSettings; |
46 | 46 | import org.citrusframework.agent.CitrusAgentConfiguration; |
47 | | -import org.citrusframework.common.TestLoader; |
48 | 47 | import org.citrusframework.common.TestSourceHelper; |
49 | 48 | import org.citrusframework.exceptions.CitrusRuntimeException; |
50 | 49 | import org.citrusframework.jbang.CitrusJBangMain; |
@@ -172,15 +171,15 @@ private int run() { |
172 | 171 | workDir = basePath; |
173 | 172 | } |
174 | 173 |
|
| 174 | + final List<TestRunConfiguration> configurations = getRunConfigurations(tests); |
| 175 | + |
175 | 176 | final ExitStatusTestReporter exitStatus = new ExitStatusTestReporter(); |
176 | 177 | CitrusInstanceManager.addInstanceProcessor(instance -> instance.addTestReporter(exitStatus)); |
177 | 178 |
|
178 | 179 | if (!offline) { |
179 | 180 | resolveArtifacts(tests); |
180 | 181 | } |
181 | 182 |
|
182 | | - final List<TestRunConfiguration> configurations = getRunConfigurations(tests); |
183 | | - |
184 | 183 | int exitCode = 0; |
185 | 184 | for (TestRunConfiguration configuration : configurations) { |
186 | 185 | // Set properties as System properties |
@@ -215,17 +214,12 @@ private void resolveArtifacts(List<String> tests) { |
215 | 214 | // Handle DSL test loaders according to file extensions |
216 | 215 | tests.stream().map(FileUtils::getFileExtension).distinct().forEach(ext -> { |
217 | 216 | if (StringUtils.hasText(ext)) { |
218 | | - |
219 | | - |
220 | | - Optional<TestLoader> existing = TestLoader.lookup(ext, true); |
221 | | - if (existing.isEmpty()) { |
222 | | - if ("feature".equals(ext)) { |
223 | | - // Add Cucumber DSL support modules and a set of default Citrus steps |
224 | | - allModules.add("citrus-cucumber"); |
225 | | - allModules.add("citrus-cucumber-core"); |
226 | | - } else { |
227 | | - allModules.add("citrus-" + ext); |
228 | | - } |
| 217 | + if ("feature".equals(ext)) { |
| 218 | + // Add Cucumber DSL support modules and a set of default Citrus steps |
| 219 | + allModules.add("citrus-cucumber"); |
| 220 | + allModules.add("citrus-cucumber-core"); |
| 221 | + } else { |
| 222 | + allModules.add("citrus-" + ext); |
229 | 223 | } |
230 | 224 | } |
231 | 225 | }); |
@@ -297,7 +291,7 @@ private void resolveArtifacts(List<String> tests) { |
297 | 291 | }); |
298 | 292 |
|
299 | 293 | // Adapt and set class loader in main thread |
300 | | - ClassLoaderHelper.updateContextClassloader(); |
| 294 | + ClassLoaderHelper.updateContextClassloader(true); |
301 | 295 | } |
302 | 296 | } |
303 | 297 |
|
|
0 commit comments