GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Do not check UrlTransporter for open connections after close by kwin · Pull Request #1977 · apache/maven-resolver

Conversation

@kwin

@kwin kwin commented Jul 18, 2026

Copy link
Copy Markdown
Member

Connection pooling for HttpUrlTransporter is managed by JRE with no way to explicitly close idle connections
(compare with
https://docs.oracle.com/javase/6/docs/technotes/guides/net/http-keepalive.html)

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

  • I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
  • In any other case, please file an Apache Individual Contributor License Agreement.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kwin
Do not check UrlTransporter for open connections after close
3c9f722
Connection pooling for HttpUrlTransporter is managed by JRE with
no way to explicitly close idle connections
(compare with
https://docs.oracle.com/javase/6/docs/technotes/guides/net/http-keepalive.html)
@kwin
kwin force-pushed the bugfix/failing-connection-check-for-urltransporter branch from 7969e5c to 3c9f722 Compare July 18, 2026 09:55
@kwin
kwin requested a review from cstamas July 18, 2026 09:55
@ascheman ascheman mentioned this pull request Jul 18, 2026
RRF: self-heal from provably broken auto-discovered prefixes files #1976
Merged
@kwin
kwin marked this pull request as ready for review July 18, 2026 10:18
@kwin
kwin requested a review from Copilot July 18, 2026 10:18
Copilot started reviewing on behalf of kwin July 18, 2026 10:19
View session
cstamas
cstamas approved these changes Jul 18, 2026
View reviewed changes
Copilot AI reviewed Jul 18, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the shared HTTP transporter test harness to avoid asserting that all HTTP connections are closed after Transporter#close() for implementations (like HttpUrlTransporter) where the JRE manages connection pooling and idle keep-alive connections cannot be explicitly closed.

Changes:

  • Add a closesAllConnectionsOnTransporterClose() hook to HttpTransporterTest and conditionally run the “no leaked connections” assertion in teardown.
  • Override that hook in UrlTransporterTest to disable the post-close open-connection assertion for the URL transporter.
  • Disable testPut_WithResponseBody for UrlTransporterTest (PUT unsupported).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
maven-resolver-transport-url/src/test/java/org/eclipse/aether/transport/url/UrlTransporterTest.java Overrides teardown connection-closure expectation for URLConnection/JRE pooling; disables an additional PUT-related test.
maven-resolver-test-http/src/main/java/org/eclipse/aether/internal/test/util/http/HttpTransporterTest.java Adds an overridable hook to control whether teardown asserts all connections are closed after transporter close.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...-test-http/src/main/java/org/eclipse/aether/internal/test/util/http/HttpTransporterTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@kwin kwin added the skip-changelog Skip this PR from automatically changelog generation label Jul 18, 2026
gnodet
gnodet reviewed Jul 18, 2026
View reviewed changes

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix. The template method pattern (closesAllConnectionsOnTransporterClose()) follows the existing hooks in this base class (supportsPreemptiveAuth(), supportsHttp3(), etc.) — immediately familiar and extensible for any future transport that also can't control its connection pool.

The testPut_WithResponseBody disable is correct — URL transport doesn't support PUT, consistent with all other PUT test disables in UrlTransporterTest.

One nit: the Awaitility timeout was reduced from 5s to 3s alongside the skip-logic change. CI is green across all 18 matrix cells, so the practical risk is low, but the reduction is undocumented. If a slow CI agent causes flakiness later, this is the line to investigate. The 5s original was presumably a generous bound.

Reviewed with oss-code-reviewer on behalf of @gnodet. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kwin
kwin merged commit f974235 into master Jul 18, 2026
24 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@kwin
kwin deleted the bugfix/failing-connection-check-for-urltransporter branch July 18, 2026 10:26
@github-actions github-actions Bot assigned kwin Jul 18, 2026
gnodet added a commit to gnodet/maven-resolver that referenced this pull request Jul 18, 2026
@gnodet
Run 54: reviewed apache#1977 and apache#1978
8d03e13
gnodet added a commit to gnodet/maven-resolver that referenced this pull request Jul 18, 2026
@gnodet
Run 54: reviewed apache#1977 and apache#1978
cf24d90
@ascheman

ascheman commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

FWIW: #1978 addresses the same failure while keeping the leak assertion active for the URL transporter (by actually closing connections in the test via Connection: close), retaining the coverage #1970 introduced. Might be worth consolidating on that approach — the testPut_WithResponseBody @Disabled part is common to both anyway.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gnodet gnodet mentioned this pull request Jul 18, 2026
Feat: config to close connection at end of tx #1978
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gnodet gnodet gnodet left review comments
Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@cstamas cstamas cstamas approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@kwin kwin

Labels

skip-changelog Skip this PR from automatically changelog generation

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@kwin @ascheman @cstamas @gnodet
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.