Skip to content

Commit 539f6a5

Browse files
committed
Revert "Make StandaloneTests lenient against unexpected error output"
This reverts commit 932ba21.
1 parent 932ba21 commit 539f6a5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

platform-tooling-support-tests/projects/standalone/expected-err.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
>> JAVA VERSION >>
21
.+ org.junit.platform.launcher.core.ServiceLoaderRegistry load
32
.+ Loaded LauncherInterceptor instances: ..
43
.+ org.junit.platform.launcher.core.ServiceLoaderRegistry load

platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/StandaloneTests.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.nio.file.Files;
2222
import java.nio.file.Path;
2323
import java.util.ArrayList;
24+
import java.util.List;
2425

2526
import de.sormuras.bartholdy.Result;
2627
import de.sormuras.bartholdy.jdk.Jar;
@@ -391,7 +392,7 @@ void executeOnJava8() throws IOException {
391392

392393
var workspace = Request.WORKSPACE.resolve("standalone");
393394
var expectedOutLines = Files.readAllLines(workspace.resolve("expected-out.txt"));
394-
var expectedErrLines = Files.readAllLines(workspace.resolve("expected-err.txt"));
395+
var expectedErrLines = getExpectedErrLinesOnJava8(workspace);
395396
assertLinesMatch(expectedOutLines, result.getOutputLines("out"));
396397
assertLinesMatch(expectedErrLines, result.getOutputLines("err"));
397398

@@ -428,7 +429,7 @@ void executeOnJava8SelectPackage() throws IOException {
428429

429430
var workspace = Request.WORKSPACE.resolve("standalone");
430431
var expectedOutLines = Files.readAllLines(workspace.resolve("expected-out.txt"));
431-
var expectedErrLines = Files.readAllLines(workspace.resolve("expected-err.txt"));
432+
var expectedErrLines = getExpectedErrLinesOnJava8(workspace);
432433
assertLinesMatch(expectedOutLines, result.getOutputLines("out"));
433434
assertLinesMatch(expectedErrLines, result.getOutputLines("err"));
434435

@@ -440,6 +441,13 @@ void executeOnJava8SelectPackage() throws IOException {
440441
+ " (group ID: org.junit.vintage, artifact ID: junit-vintage-engine, version: " + vintageVersion));
441442
}
442443

444+
private static List<String> getExpectedErrLinesOnJava8(Path workspace) throws IOException {
445+
var expectedErrLines = new ArrayList<String>();
446+
expectedErrLines.add(">> JAVA VERSION >>");
447+
expectedErrLines.addAll(Files.readAllLines(workspace.resolve("expected-err.txt")));
448+
return expectedErrLines;
449+
}
450+
443451
@Test
444452
@Order(6)
445453
@Disabled("https://github.com/junit-team/junit5/issues/1724")

0 commit comments

Comments
 (0)