Skip to content

Commit 26bb440

Browse files
committed
Fix usage of TimeoutExtension from module path
1 parent a24a0f0 commit 26bb440

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

junit-jupiter-engine/src/module/org.junit.jupiter.engine/module-info.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@
2020

2121
provides org.junit.platform.engine.TestEngine
2222
with org.junit.jupiter.engine.JupiterTestEngine;
23+
24+
opens org.junit.jupiter.engine.extension to org.junit.platform.commons;
2325
}

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import static org.junit.jupiter.api.Assertions.assertEquals;
1414
import static org.junit.jupiter.api.Assertions.assertLinesMatch;
1515
import static org.junit.jupiter.api.Assertions.assertTrue;
16+
import static org.junit.jupiter.api.Assertions.fail;
1617

1718
import java.io.File;
1819
import java.io.PrintWriter;
@@ -139,10 +140,16 @@ private static List<String> junit(Path temp, Writer out, Writer err) throws Exce
139140

140141
var builder = new ProcessBuilder(command).directory(temp.toFile());
141142
// var java = builder.inheritIO().start(); // show "console" output and errors
142-
var java = builder.redirectErrorStream(true).redirectOutput(ProcessBuilder.Redirect.DISCARD).start();
143+
var java = builder.start();
143144
var code = java.waitFor();
144145

145-
assertEquals(0, code, out.toString());
146+
if (code != 0) {
147+
System.out.println(out);
148+
System.err.println(err);
149+
System.out.println(new String(java.getInputStream().readAllBytes()));
150+
System.err.println(new String(java.getErrorStream().readAllBytes()));
151+
fail("Unexpected exit code: " + code);
152+
}
146153
return command;
147154
}
148155

0 commit comments

Comments
 (0)