Copilot commented on code in PR #1977:
URL: https://github.com/apache/maven-resolver/pull/1977#discussion_r3608164753


##########
maven-resolver-test-http/src/main/java/org/eclipse/aether/internal/test/util/http/HttpTransporterTest.java:
##########
@@ -307,15 +307,25 @@ protected void tearDown() throws Exception {
             closer = null;
         }
         if (httpServer != null) {
-            // check for leaked connections (e.g., due to not closing response 
body streams)
-            Awaitility.await().atMost(5, TimeUnit.SECONDS).until(() -> 
httpServer.getNumConnectedEndPoints() == 0);
+            if (closesAllConnectionsOnTransporterClose()) {
+                // check for leaked connections (e.g., due to not closing 
response body streams)
+                Awaitility.await().atMost(3, TimeUnit.SECONDS).until(() -> 
httpServer.getNumConnectedEndPoints() == 0);
+            }

Review Comment:
   The PR’s stated goal is to skip the connection-leak assertion for 
transporters that can’t force-close pooled connections. Reducing the Awaitility 
timeout from 5s to 3s is an additional behavioral change for all other 
transporters and can make teardown more timing-sensitive on slower CI agents. 
Consider keeping the previous 5s timeout (or justify the reduction separately).



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