gnodet opened a new issue, #2203:
URL: https://github.com/apache/maven-resolver/issues/2203

   ## Summary
   
   `JettyTransporterTest` is flaky on macOS runners. Two tests intermittently 
fail with `progressedCount = 0` when a progress event is expected to have been 
fired:
   
   - `testPut_ProxyAuthenticated` — asserts `listener.getProgressedCount() > 0` 
after a PUT through an authenticated proxy
   - `testPut_SSL` — asserts `listener.getProgressedCount() > 0` after a PUT 
over TLS/HTTP2
   
   ## Observed failures
   
   Both failures manifest as:
   ```
   expected: <6> but was: <0>
     at 
HttpTransporterTest.testPut_ProxyAuthenticated(HttpTransporterTest.java:1377)
   ```
   ```
   expected: <6> but was: <0>
     at HttpTransporterTest.testPut_SSL(HttpTransporterTest.java:1416)
   ```
   
   The `getProgressedCount()` method returns `0`, meaning no progress listener 
callback was invoked during the upload, even though the upload itself succeeded 
(the file is written and `getDataLength()` == 6).
   
   ## Affected environments
   
   - macOS runners only (both `macos-latest jdk-25-zulu` and `macos-latest 
jdk-26-zulu`)
   - Observed with Maven 4.0.0-rc-6
   - Not reproduced on Linux or Windows runners
   
   ## Root cause hypothesis
   
   The `RecordingTransportListener.progressed()` callback is a race condition: 
on macOS, with proxy authentication or TLS handshakes involved, the upload 
completes (possibly via a buffered or preemptive path) without triggering the 
`transferProgressed` event in the Jetty client listener. This may be related to 
how Jetty handles the request content stream lifecycle during authentication 
challenges — the content may be replayed without going through the progress 
listener path.
   
   ## Impact
   
   These flaky failures block PR merges when they surface on macOS. They are 
unrelated to the changes being reviewed (as seen in #2180, where the PR only 
touches the JDK transport module).
   
   ## Suggested fix
   
   Investigate whether `JettyTransporter` always fires `transferProgressed` 
events for small uploads during proxy auth and TLS flows. Consider:
   1. Ensuring `RequestContentProgressListener` is wired in all code paths 
(including retried/replayed requests after 407/401 challenges)
   2. Or relaxing the assertion to `>= 0` with a comment explaining why 
progress may be absent in challenge flows
   
   ## References
   
   - First observed: 
https://github.com/apache/maven-resolver/actions/runs/38281964674/job/114921299663
 (macOS jdk-25 4.0.0-rc-6)
   - Second instance: 
https://github.com/apache/maven-resolver/actions/runs/38281964674/job/114921299766
 (macOS jdk-26 4.0.0-rc-6)
   


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