gnodet opened a new pull request, #12970:
URL: https://github.com/apache/maven/pull/12970

   ## Summary
   
   - Force `providers("exec")` in the test's `TerminalBuilder` configuration so 
JLine creates a lightweight `ExternalTerminal` instead of a `PosixPtyTerminal` 
via the FFM provider
   - With `system(false)`, the FFM provider calls `CLibrary.openpty()` creating 
a real PTY pair; the subsequent grapheme-cluster probe (`ensureModesProbed()`) 
then blocks on the idle PTY master for the full probe timeout, and the PTY's 
pump threads can stall `close()` during teardown — making the tests flaky on 
slow CI machines
   - The exec provider's `ExternalTerminal` avoids all of this: no PTY, no pump 
threads, and `supportsGraphemeClusterMode()` returns `false` immediately
   
   **Root cause:** `TerminalBuilder.doBuild()` with `system(false)` enters the 
non-system path which iterates through FFM/JNI/exec providers. The `dumb(true)` 
flag is ignored in this path. On systems with FFM support, the FFM provider 
creates a `PosixPtyTerminal` via `CLibrary.openpty()`. Then `build()` calls 
`supportsGraphemeClusterMode()` → `probeGraphemeClusterMode()` → 
`ensureModesProbed()` → `probeModes()`, which sends DECRQM/DA1 escape sequences 
and blocks on `readTerminalResponse()` waiting for responses from the PTY 
(which never come because no terminal emulator is connected). Additionally, 
`PosixPtyTerminal` starts input/output pump threads that can further delay 
teardown.
   
   **Failed builds:** 
https://github.com/apache/maven/actions/runs/33349929091/job/99362003331
   
   ## Test plan
   
   - [x] `mvn test -pl impl/maven-jline -Dtest=FastTerminalReentrancyTest` 
passes (5/5 tests, ~0.4s)
   - [x] 5 consecutive runs all pass consistently
   - [x] Full `impl/maven-jline` module tests pass
   - [ ] CI build passes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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