File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
documentation/src/docs/asciidoc/user-guide
junit-platform-commons/src/main/java/org/junit/platform/commons/util Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -2177,7 +2177,8 @@ JUnit Jupiter supports the `junit.jupiter.execution.timeout.mode` configuration
21772177to configure when timeouts are applied. There are three modes: `enabled`, `disabled`,
21782178and `disabled_on_debug`. The default mode is `enabled`.
21792179A VM runtime is considered to run in debug mode when one of its input parameters starts
2180- with `-agentlib:jdwp`. This heuristic is queried by the `disabled_on_debug` mode.
2180+ with `-agentlib:jdwp` or `-Xrunjdwp`.
2181+ This heuristic is queried by the `disabled_on_debug` mode.
21812182
21822183
21832184[[writing-tests-parallel-execution]]
Original file line number Diff line number Diff line change @@ -40,16 +40,10 @@ private RuntimeUtils() {
4040 * Try to determine whether the VM was started in debug mode or not.
4141 */
4242 public static boolean isDebugMode () {
43- Optional <List <String >> optionalArguments = getInputArguments ();
44- if (!optionalArguments .isPresent ()) {
45- return false ;
46- }
47- for (String argument : optionalArguments .get ()) {
48- if (argument .startsWith ("-agentlib:jdwp" )) {
49- return true ;
50- }
51- }
52- return false ;
43+ return getInputArguments () //
44+ .map (args -> args .stream ().anyMatch (
45+ arg -> arg .startsWith ("-agentlib:jdwp" ) || arg .startsWith ("-Xrunjdwp" ))) //
46+ .orElse (false );
5347 }
5448
5549 /**
You can’t perform that action at this time.
0 commit comments