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

   The part of wagon's JUnit 4 tail that needs no decision. Six tests across 
three provider modules extend `junit.framework.TestCase` or import `org.junit` 
directly and depend on nothing else, so they can move on their own.
   
   | module | migrated | JUnit 4 after |
   |---|---|---|
   | `wagon-http-shared` | `EncodingUtilTest` | none — `junit:junit` removed |
   | `wagon-ssh-common` | `LSParserTest`, `FileKnownHostsProviderTest` | none — 
`junit:junit` removed |
   | `wagon-webdav-jackrabbit` | `HttpClientWagonTest`, `MultiStatusTest`, 
`PathNavigatorTest` | `WebDavWagonTest` + 3 subclasses |
   
   **Why webdav keeps `junit:junit`.** `WebDavWagonTest` and its three 
subclasses inherit their tests from `HttpWagonTestCase`, which lives in 
`wagon-provider-test`'s **published** API and still extends `PlexusTestCase` — 
that inheritance is where the module's 295 tests come from. They cannot move 
until the base class does, so `junit-vintage-engine` is added to keep them 
discoverable now that surefire selects the JUnit Platform provider for the 
module. That dependency comes back out when the base classes migrate.
   
   **Nothing a third party can extend is touched here**, which is the point of 
the split: this needs no decision about the published test-support artifacts.
   
   ### What is deliberately not in this PR
   
   - `wagon-provider-test` (`WagonTestCase`, `StreamingWagonTestCase`, 
`HttpWagonTestCase`), `wagon-ssh-common-test` (`KnownHostsProviderTestCase`) 
and `wagon-tck-http` (`Assertions`, `GetWagonTests`, `HttpWagonTests`) are all 
`src/main/java` of published artifacts that third-party wagon providers extend. 
Migrating them breaks those consumers at compile time on the 3.x line, which 
wants a dev@ decision first.
   - The three `@RunWith(Suite.class)` aggregators (`wagon-http/TckTest`, 
`wagon-http-lightweight/TckTest`, `sample-tck-consumer/TestSuite`) name 
`GetWagonTests` directly, so they are bound to the same question rather than 
independent of it.
   - `wagon-http`'s three standalone unit tests are held back on purpose: that 
module also holds the TCK suite and two `PlexusTestCase` tests, so migrating it 
piecemeal would mean adding a vintage engine there that gets removed again 
shortly. Happy to fold them in if you would rather.
   
   ### Verification
   
   `mvn test` per module, before and after — identical:
   
   ```
   wagon-http-shared         12 -> 12
   wagon-ssh-common           7 ->  7
   wagon-webdav-jackrabbit  295 -> 295
   ```
   
   Surefire switches from `JUnit4Provider` to `JUnitPlatformProvider`, 
confirming these really run under Jupiter and that the vintage engine keeps 
webdav's 295 alive.
   
   Matching counts alone would not prove the assertions still assert, so one 
was checked negatively: corrupting an expected value in `EncodingUtilTest` 
yields `org.opentest4j.AssertionFailedError: expected: <ZZZ_WRONG> but was: 
<https://host:1234/test/demo/>` — an opentest4j failure, so it is the Jupiter 
path doing the work.
   
   `spotless:check` clean. Draft until CI confirms.
   
   Generated-by: Claude Opus 5 (1M context)
   


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