slachiewicz opened a new pull request, #937:
URL: https://github.com/apache/maven-wagon/pull/937

   Backport of #936. Same four published base classes: `WagonTestCase`,
   `CommandExecutorTestCase`, `HttpWagonTestCase` and 
`KnownHostsProviderTestCase`.
   
   **This one reaches third-party providers, and `wagon-3.x` is a patch line.** 
These classes live
   in `src/main/java` of released artifacts and carry no annotations today — 
they are discovered by
   JUnit 3 naming through `PlexusTestCase extends junit.framework.TestCase`. A 
provider whose test
   does `class MyWagonTest extends HttpWagonTestCase {}` inherits those tests 
today; once the base
   is on Jupiter and that provider has no Jupiter engine in their own POM, 
surefire keeps selecting
   the JUnit 4 provider and the inherited tests are **no longer discovered** — 
a green build with
   no coverage, rather than a compile error. Their own `testXxx()` methods, 
written in the style
   this base class taught them, stop running for the same reason. This is worth 
a release note.
   
   The earlier plan kept `wagon-3.x` on JUnit 4 for exactly that reason; the 
decision to accept it
   here is deliberate.
   
   Three things carried over from #936, unchanged: `plexus-testing` is compile 
scope on
   `wagon-provider-test` and `wagon-ssh-common-test` because `@PlexusTest` sits 
on published
   classes; the six members lost with `PlexusTestCase` are replaced rather than 
dropped so
   subclasses keep compiling; and `runTest()`/`testSkipped` become 
`assumeTrue`, so wagon-scm tests
   needing an external `cvs` now report as skipped where they previously 
reported as passing.
   
   Five places this branch deliberately differs from master, because the lines 
have drifted:
   
   * `Assertions`, `HttpWagonTests` and `StreamingWagonTestCase` keep 
`plexus-util`'s `FileUtils`
     and `IOUtil`. Master dropped them for `java.nio`; here they are still in 
use and unrelated to
     the migration.
   * `HttpWagonTestCase` keeps the commented-out `testDeflateGet` block that 
master has since
     removed.
   * `HttpWagonTestCase` keeps `FileUtils.fileRead` rather than taking master's 
switch to
     `Files.readAllBytes`; only the `assertEquals` argument order changes.
   * `AbstractHttpClientWagonTest` swaps four `assertThat(x, 
instanceOf(Y.class))` for
     `assertInstanceOf`. Hamcrest was never declared here — it arrived 
transitively through
     `junit:junit`, which this change removes. Master has no Hamcrest left to 
worry about; on this
     branch the choice was between declaring `hamcrest-core:1.3` explicitly or 
using the assertion
     JUnit 5 already provides.
   * `FtpWagonTest` gains a static import for `assertTrue`, which it previously 
inherited from
     `junit.framework.TestCase`. Master replaced that call with 
`assertNotNull(e.getMessage())` in
     unrelated work; that improvement is not backported here.
   
   Verified: per-module `<testcase>` element counts in the surefire XML are 
unchanged against
   `3fca786f` across all eight provider modules, with no new errors or failures.
   
   *This change was created with AI assistance.*
   


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