Skip to content

Enable migrateTransitiveParent test for HttpClient 5 upgrade#126

Merged
timtebeek merged 1 commit intomainfrom
tim/enable-dep-insight-test
Apr 11, 2026
Merged

Enable migrateTransitiveParent test for HttpClient 5 upgrade#126
timtebeek merged 1 commit intomainfrom
tim/enable-dep-insight-test

Conversation

@timtebeek
Copy link
Copy Markdown
Member

@timtebeek timtebeek commented Apr 11, 2026

Summary

  • Enable the @Disabled migrateTransitiveParent test in UpgradeApacheHttpClient5Test

  • The test was disabled blaming DependencyInsight for not considering transitive parent dependencies, but the actual issue was that the child module had no Java source files — so AddDependency's onlyIfUsing: org.apache.http..* gate never triggered

  • Add Java source files using old Apache HTTP types (CloseableHttpClient, HttpClients) to the child module, with before/after expectations for the migration

  • Simplify POM assertion to use assertThat(pom).contains(...).containsPattern(...).actual() pattern

  • Relates to Spring 6+ upgrades trigger migration to HttpClient 5 – how to deal with undeclared dependency on HttpClient 4? #35

Test plan

  • migrateTransitiveParent test passes
  • Full UpgradeApacheHttpClient5Test suite passes

The test was disabled with a misleading message blaming
DependencyInsight for not considering transitive parent dependencies.
The actual issue was that the test had no Java source files in the
child module, so AddDependency's onlyIfUsing gate never triggered.

Add Java source files using old Apache HTTP types to the child module
and simplify the POM assertion to use assertThat chain with .actual().
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Apr 11, 2026
@timtebeek timtebeek merged commit 4318dfd into main Apr 11, 2026
1 check passed
@timtebeek timtebeek deleted the tim/enable-dep-insight-test branch April 11, 2026 21:33
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant