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

   Backport of #928. Only tests that do not extend the bases published from 
`wagon-provider-test` move;
   those bases stay on `PlexusTestCase`, since external providers inherit their 
test methods by the
   `testXxx()` convention and would silently run none of them.
   
   `wagon-http` keeps `junit` and gains `junit-vintage-engine` alongside 
`junit-jupiter`. `HttpWagonTest`,
   `HttpsWagonTest` and both Preemptive variants inherit from the published 
`HttpWagonTestCase` — 58 tests
   each — and surefire provisions the jupiter engine but not the vintage one.
   
   `BasicAuthScopeTest` and `HttpClientWagonTest` are byte-identical to 
master's pre-migration state, so
   master's reviewed result is taken verbatim. `AbstractHttpClientWagonTest` 
has drifted here and needed
   two things master never faced: JUnit 5 has no `Assertions.assertThat`, so 
its four uses move to
   `org.hamcrest.MatcherAssert` (Hamcrest stays available through `junit` 
4.13.2, which this module keeps);
   and `@Ignore` becomes `@Disabled` on a method that carries no `@Test` and so 
never ran under either
   framework.
   
   ### Verification
   
   `mvn test` on `wagon-http`, comparing `<testcase>` elements per class rather 
than the `tests=`
   attribute: **295 before, 295 after**, same per class, 2 skipped in both.
   
   Both runs end with one error, and it is not the same test:
   
   | | error |
   |---|---|
   | before | `HttpsWagonTest.testSecuredPutUnauthorized` |
   | after | `HttpWagonTest.testProxiedRequest` |
   
   That is order-dependent interference between these classes, which share a 
static `HttpClient` and proxy
   system properties, not something this change introduces. Run on its own, 
`HttpWagonTest` is 58 tests and
   0 errors on **both** trees — unmigrated and migrated. The engine switch 
changes execution order, so a
   different order-dependent test is the one that loses. Worth knowing when 
reading CI here; it is a
   pre-existing fragility in these tests and is not addressed by this PR.
   
   One reporting quirk if you re-run this yourself: once the platform provider 
is active, the `tests=`
   attribute surefire writes for `TckTest` reads 20 rather than 40, because 
that class is a JUnit 4
   `@RunWith(Suite.class)` aggregating two suites. All 40 `<testcase>` elements 
are present and both suites
   run — counting the attribute makes it look like twenty tests vanished.
   
   *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