Migrate the published test base classes off PlexusTestCase - #937
Merged
Conversation
Tests needing an external cvs binary now use assumeTrue and report as skipped; runTest() reported them as passing. Do not restore that to quieten CI.
slachiewicz
marked this pull request as ready for review
August 18, 2026 14:54
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #936. Same four published base classes:
WagonTestCase,CommandExecutorTestCase,HttpWagonTestCaseandKnownHostsProviderTestCase.This one reaches third-party providers, and
wagon-3.xis a patch line. These classes livein
src/main/javaof released artifacts and carry no annotations today — they are discovered byJUnit 3 naming through
PlexusTestCase extends junit.framework.TestCase. A provider whose testdoes
class MyWagonTest extends HttpWagonTestCase {}inherits those tests today; once the baseis 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 stylethis base class taught them, stop running for the same reason. This is worth a release note.
The earlier plan kept
wagon-3.xon JUnit 4 for exactly that reason; the decision to accept ithere is deliberate.
Three things carried over from #936, unchanged:
plexus-testingis compile scope onwagon-provider-testandwagon-ssh-common-testbecause@PlexusTestsits on publishedclasses; the six members lost with
PlexusTestCaseare replaced rather than dropped sosubclasses keep compiling; and
runTest()/testSkippedbecomeassumeTrue, so wagon-scm testsneeding an external
cvsnow report as skipped where they previously reported as passing.Five places this branch deliberately differs from master, because the lines have drifted:
Assertions,HttpWagonTestsandStreamingWagonTestCasekeepplexus-util'sFileUtilsand
IOUtil. Master dropped them forjava.nio; here they are still in use and unrelated tothe migration.
HttpWagonTestCasekeeps the commented-outtestDeflateGetblock that master has sinceremoved.
HttpWagonTestCasekeepsFileUtils.fileReadrather than taking master's switch toFiles.readAllBytes; only theassertEqualsargument order changes.AbstractHttpClientWagonTestswaps fourassertThat(x, instanceOf(Y.class))forassertInstanceOf. Hamcrest was never declared here — it arrived transitively throughjunit:junit, which this change removes. Master has no Hamcrest left to worry about; on thisbranch the choice was between declaring
hamcrest-core:1.3explicitly or using the assertionJUnit 5 already provides.
FtpWagonTestgains a static import forassertTrue, which it previously inherited fromjunit.framework.TestCase. Master replaced that call withassertNotNull(e.getMessage())inunrelated work; that improvement is not backported here.
Verified: per-module
<testcase>element counts in the surefire XML are unchanged against3fca786facross all eight provider modules, with no new errors or failures.This change was created with AI assistance.