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

   Completes the wagon-http side of moving off `PlexusTestCase`: the abstract
   `HttpWagonHttpServerTestCase` and its two subclasses.
   
   No new dependency is needed. The container was only supplying `Wagon.ROLE`, 
which is `HttpWagon`, and
   `AbstractHttpClientWagon` declares no injected collaborators, so `new 
HttpWagon()` is equivalent to the
   lookup — the same reasoning already applied to `HugeFileDownloadTest`.
   
   Two details that are not mechanical and are worth a look:
   
   - The base lifecycle method is renamed `startTestServer`. Left as `setUp()`, 
the subclasses' own
     `setUp()` would override it, and JUnit 5 would then run only the override 
— the Jetty server would
     never be created and every test would fail on a null. With distinct names 
JUnit 5 runs the
     superclass `@BeforeEach` first in its own right, so the subclasses drop 
their `super.setUp()` call.
   - `getName()` came from `junit.framework.TestCase` and is used to build 
unique temp file names
     \(`FileTestUtils.createUniqueFile(getName(), getName())`, six call 
sites\). It now comes from an
     injected `TestInfo`, so those call sites are unchanged.
   
   Verified: `mvn test` on `wagon-http`, counting `<testcase>` elements per 
class — 295 before and after,
   2 skipped in both, zero failures. `HttpWagonErrorTest` stays at 5 and 
`HttpWagonTimeoutTest` at 4,
   which is what shows the base setup still runs; had it not, both would have 
failed on a null server
   rather than silently reporting fewer tests.
   
   *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