Move tests that depend on MavenModuleSet and MavenModuleSetBuild from Jenkins core to Maven Integration #155
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.
Background
See jenkinsci/jenkins#5118 (comment). The tests in Jenkins core depend on an old version of
maven-plugin
. This pollutes the dependency tree for the tests in Jenkins core, causingRequireUpperBoundDeps
issues and complicating maintenance.Problem
A number of tests in Jenkins core depend on
hudson.maven.MavenModuleSet
orhudson.maven.MavenModuleSetBuild
. These classes were previously in Jenkins core before they were extracted tomaven-plugin
. However, the corresponding tests were never moved tomaven-plugin
. As a result, the tests are no longer in the same repository as the code under test.Solution
Move the tests in Jenkins core that depend on
hudson.maven.MavenModuleSet
orhudson.maven.MavenModuleSetBuild
tomaven-plugin
.Implementation
A handful of these tests were already disabled for several years; we do not make any effort to revive these or move them. Rather we only move the tests that are still running regularly. Below is a detailed description of the change:
PluginManagerTest#optionalMavenDependency
: This test relies onhudson.maven.agent.AbortException
with a comment stating: "this actually doesn't really test what we need." The test seemed pointless, so we deleted it.Operation2174Test#testBuildChains
: Moved tomaven-plugin
.ListJobsCommandTest#getAllJobsFromFolderWithMavenModuleSet
: Moved tomaven-plugin
.GetEnvironmentOutsideBuildTest#testMaven
: The entire test class is disabled with a comment stating: "It's unfortunately not working, yet, as whenJenkinsMasterHasNoExecutors is not working as expected." The test seemed pointless, so we deleted it.HelpLinkTest#mavenConfig
: The entire test class is disabled with a comment stating: "Excluding test to be able to ship 2.0 beta 1. Jenkins confirms that this test is now taking 45mins to complete." The test seemed pointless, so we deleted it.JobPropertyTest#jobPropertySummaryIsShownInMavenModuleSetIndexPage
: Moved tomaven-plugin
.NodeTest#testGetAssignedLabelWithJobs
,NodeTest#testGetAssignedLabelMultipleSlaves
, andNodeTest#testGetAssignedLabelWhenLabelRemoveFromProject
: Moved tomaven-plugin
.BuildTriggerTest#mavenBuildTrigger
andBuildTriggerTest#mavenTriggerEvenWhenUnstable
: These tests are disabled with a comment stating: "Fails on CI due to maven trying to download from maven central on http, which is no longer supported". The tests seemed pointless, so we deleted them.ToolLocationNodePropertyTest#maven
: Moved tomaven-plugin
.ToolLocationNodePropertyTest#nativeMaven
: This test is disabled with a comment stating: "Fails on CI due to maven trying to download from maven central on http, which is no longer supported". The test seemed pointless, so we deleted it.JenkinsBuildsAndWorkspacesDirectoriesTest#testItemFullNameExpansion
: Moved tomaven-plugin
.SimpleBuildWrapperTest#disposerWithMaven
: Moved tomaven-plugin
.ListScmBrowsersTest#selectBoxesUnique_MavenProject
: Moved tomaven-plugin
.