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
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
2177
2177
to configure when timeouts are applied. There are three modes: `enabled`, `disabled`,
2178
2178
and `disabled_on_debug`. The default mode is `enabled`.
2179
2179
A 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.
2181
2182
2182
2183
2183
2184
[[writing-tests-parallel-execution]]
Original file line number Diff line number Diff line change @@ -40,16 +40,10 @@ private RuntimeUtils() {
40
40
* Try to determine whether the VM was started in debug mode or not.
41
41
*/
42
42
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 );
53
47
}
54
48
55
49
/**
You can’t perform that action at this time.
0 commit comments