apache / apache/maven-surefire

CommandlineExecutorTest fails / project on mater branch can't be build (Win 11, Maven 3.9.16, Java 25)

Open
#3,366 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
461
Forks
588
Avg merge
1d 8h
Merged PRs (30d)
19

Description

### Affected version

3.6.0-SNAPSHOT (current master)

### Bug description

master build fails due this error

```
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.539 s <<< FAILURE! -- in org.apache.maven.plugin.surefire.extensions.CommandlineExecutorTest
[ERROR] org.apache.maven.plugin.surefire.extensions.CommandlineExecutorTest.shouldExecuteNativeCommand -- Time elapsed: 0.519 s <<< FAILURE!
Wanted but not invoked:
eventHandler.handleEvent(contains("a.txt"));
-> at org.apache.maven.plugin.surefire.extensions.CommandlineExecutorTest.shouldExecuteNativeCommand(CommandlineExecutorTest.java:93)
Actually, there were zero interactions with this mock.

at org.apache.maven.plugin.surefire.extensions.CommandlineExecutorTest.shouldExecuteNativeCommand(CommandlineExecutorTest.java:93)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] CommandlineExecutorTest.shouldExecuteNativeCommand:93
Wanted but not invoked:
eventHandler.handleEvent(contains("a.txt"));
-> at org.apache.maven.plugin.surefire.extensions.CommandlineExecutorTest.shouldExecuteNativeCommand(CommandlineExecutorTest.java:93)
Actually, there were zero interactions with this mock.
```

```
D:\Github\Maven\maven-surefire>mvn --version
Apache Maven 3.9.16 (2bdd9fddda4b155ebf8000e807eb73fd829a51d5)
Maven home: C:\apache-maven-3.9.16
Java version: 25.0.2, vendor: Azul Systems, Inc., runtime: C:\Program Files\Zulu\zulu-25
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
```

Contributor guide

Open the contributing guide

Research direction

Start by running org.apache.maven.plugin.surefire.extensions.CommandlineExecutorTest.shouldExecuteNativeCommand on Windows 11 with Java 25 and Maven 3.9.16. Inspect CommandlineExecutorTest.java around line 93 and the native-command execution path to determine why the event handler receives no interaction. Done means the test observes the expected a.txt event and the project build passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.