Skip to content

Commit

Permalink
Revert to surefire 3.0.0-M5 to avoid issue eclipse-tycho#879
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelistria committed Apr 14, 2022
1 parent be74d52 commit 26671d0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
<pluginToolsVersion>3.6.4</pluginToolsVersion>
<maven-version>3.8.5</maven-version>
<!-- NOTE: when updating surefire version, double-check Import-Package statements generated by bnd-maven-plugin and possibly adapt instructions in various bnd.bnd files -->
<surefire-version>3.0.0-M6</surefire-version>
<!-- Stick to 3.0.0-M5 because of https://github.com/eclipse/tycho/issues/879 / https://issues.apache.org/jira/projects/SUREFIRE/issues/SUREFIRE-2072 -->
<surefire-version>3.0.0-M5</surefire-version>

<equinoxVersion>3.17.200</equinoxVersion>
<ecjVersion>3.29.0</ecjVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2",
Bundle-ActivationPolicy: lazy
Bundle-Version: 3.0.0.qualifier
Bundle-ClassPath: .,
jars/surefire-booter-3.0.0-M6.jar,
jars/surefire-api-3.0.0-M6.jar,
jars/surefire-logger-api-3.0.0-M6.jar,
jars/surefire-extensions-api-3.0.0-M6.jar,
jars/common-junit4-3.0.0-M6.jar,
jars/common-java5-3.0.0-M6.jar,
jars/maven-surefire-common-3.0.0-M6.jar,
jars/maven-failsafe-plugin-3.0.0-M6.jar,
jars/surefire-shared-utils-3.0.0-M6.jar
jars/surefire-booter-3.0.0-M5.jar,
jars/surefire-api-3.0.0-M5.jar,
jars/surefire-logger-api-3.0.0-M5.jar,
jars/surefire-extensions-api-3.0.0-M5.jar,
jars/common-junit4-3.0.0-M5.jar,
jars/common-java5-3.0.0-M5.jar,
jars/maven-surefire-common-3.0.0-M5.jar,
jars/maven-failsafe-plugin-3.0.0-M5.jar,
jars/surefire-shared-utils-3.0.0-M5.jar
Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.tycho.surefire.osgibooter;singleton:=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public class OsgiSurefireBooter {
private static final String XSD = "https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd";

public static int run(String[] args, Properties testProps) throws Exception {
boolean failIfNoTests = Boolean.parseBoolean(testProps.getProperty("failifnotests", "false"));
boolean redirectTestOutputToFile = Boolean
.parseBoolean(testProps.getProperty("redirectTestOutputToFile", "false"));
String testPlugin = testProps.getProperty("testpluginname");
Expand Down Expand Up @@ -108,18 +109,20 @@ public static int run(String[] args, Properties testProps) throws Exception {
// but without dirScannerParams we get an NPE accessing runOrder
DirectoryScannerParameters dirScannerParams = new DirectoryScannerParameters(testClassesDir,
Collections.<String> emptyList(), Collections.<String> emptyList(), Collections.<String> emptyList(),
runOrder);
failIfNoTests, runOrder);
ReporterConfiguration reporterConfig = new ReporterConfiguration(reportsDir, trimStackTrace);
TestRequest testRequest = new TestRequest(suiteXmlFiles, testClassesDir,
TestListResolver.getEmptyTestListResolver(), rerunFailingTestsCount);
ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams,
new RunOrderParameters(runOrder, null), reporterConfig, null, testRequest,
new RunOrderParameters(runOrder, null), failIfNoTests, reporterConfig, null, testRequest,
extractProviderProperties(testProps), null, false, Collections.<CommandLineOption> emptyList(),
skipAfterFailureCount, Shutdown.DEFAULT, 30);
SurefireConsoleOutputReporter consoleOutputReporter = new SurefireConsoleOutputReporter();
//consoleOutputReporter.setDisable(true); // storing console output causes OOM, see https://github.com/eclipse/tycho/issues/879 & https://issues.apache.org/jira/browse/SUREFIRE-1845
StartupReportConfiguration startupReportConfig = new StartupReportConfiguration(useFile, printSummary,
ConsoleReporter.PLAIN, redirectTestOutputToFile, reportsDir, trimStackTrace, null,
new File(reportsDir, "TESTHASH"), false, rerunFailingTestsCount, XSD, StandardCharsets.UTF_8.toString(),
false, new SurefireStatelessReporter(disableXmlReport, null), new SurefireConsoleOutputReporter(),
ConsoleReporter.PLAIN, false, reportsDir, trimStackTrace, null, new File(reportsDir, "TESTHASH"), false,
rerunFailingTestsCount, XSD, StandardCharsets.UTF_8.toString(), false,
new SurefireStatelessReporter(disableXmlReport, null), consoleOutputReporter,
new SurefireStatelessTestsetInfoReporter());
ReporterFactory reporterFactory = new DefaultReporterFactory(startupReportConfig,
new PrintStreamLogger(System.out));
Expand Down

0 comments on commit 26671d0

Please sign in to comment.