slachiewicz opened a new issue, #77:
URL: https://github.com/apache/maven-executor/issues/77

   ### Affected version
   
   1.0.0, `main` at ae2fe0e
   
   ### Bug description
   
   `EmbeddedMavenExecutor` never reads `ExecutorRequest.executionTimeout()`, so 
a build that hangs in embedded mode blocks the caller indefinitely. 
`ExecutorHelper` in `Mode.AUTO` picks embedded whenever a request has no 
environment variables or JVM arguments 
([`ExecutorHelperImpl.java:125`](https://github.com/apache/maven-executor/blob/main/maven-executor/src/main/java/org/apache/maven/executor/support/ExecutorHelperImpl.java#L125)),
 so setting only a timeout does not move the request to the forked executor, 
where the timeout works.
   
   Reproduction: `-B validate` on a one-module project with 
`executionTimeout(Duration.ofMillis(1))`:
   
   | Maven | forked | embedded | `ExecutorHelper`, `Mode.AUTO` |
   |---|---|---|---|
   | 3.9.16 | `ExecutorException: Process timeout` | exit 0 after 2,096 ms | 
exit 0 |
   | 4.0.0-rc-7 | `ExecutorException: Process timeout` | exit 0 after 5,440 ms 
| exit 0 |
   
   Either embedded mode honors the timeout, or it rejects a request that sets 
one and `Mode.AUTO` routes such requests to forked. Related: item E8 in #49 
(AUTO picking embedded where embedding cannot work).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to