Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-21014] include verify in upstream candidate calculation
- changed test to make sure that dependencies for test projects are available in repository
  • Loading branch information
christiangalsterer committed Mar 29, 2014
1 parent f8d2b84 commit 9687602
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/test/java/hudson/maven/MavenSnapshotTriggerTest.java
Expand Up @@ -84,12 +84,26 @@ public void testMixedTransitiveSnapshotTrigger() throws Exception {
* Verifies SNAPSHOT dependency resolution of multiple SNAPSHOT upstream dependencies. (JENKINS-21014)
* Note - has to build the projects once each first in order to get dependency info.
* Artifact C depends on artifacts A and B.
* For artifact A there exists two projects. Project A1 has install and A1 has verify in its maven goal. A1 is selected as upstream build for artifact C due to higher ranking of install over verify.
* For artifact B there exists two projects. Projects B1 has compile and B2 has verify in its maven goal. B2 is preferred as upstream dependency for artifact B as the verify goal takes precedence over the name tiebreaker which would prefer project B1.
* For artifact A there exists two projects. Project A1 has install and A2 has verify in its maven goal. A1 is selected as upstream build for artifact C due to higher ranking of install over verify.
* For artifact B there exists two projects. Projects B1 has compile and B2 has verify in its maven goal. B2 is preferred as upstream dependency for artifact B as the verify goal takes precedence over the name tiebreaker which would prefer project B1.
*/
public void testMultipleDependencySnapshotTrigger() throws Exception {
configureDefaultMaven();

// This is only executed to make sure that dependency A is available in repository
MavenModuleSet prepareProject = createMavenProject("prepareProject");
prepareProject.setGoals("clean install");
prepareProject.setScm(new ExtractResourceSCM(getClass().getResource("maven-dep-test-A.zip")));
buildAndAssertSuccess(prepareProject);
prepareProject.delete();

// This is only executed to make sure that dependency B is available in repository
prepareProject = createMavenProject("prepareProject");
prepareProject.setGoals("clean install");
prepareProject.setScm(new ExtractResourceSCM(getClass().getResource("maven-dep-test-B.zip")));
buildAndAssertSuccess(prepareProject);
prepareProject.delete();

MavenModuleSet projA1 = createMavenProject("snap-dep-test-A1");
projA1.setGoals("clean install");
projA1.setScm(new ExtractResourceSCM(getClass().getResource("maven-dep-test-A.zip")));
Expand Down

0 comments on commit 9687602

Please sign in to comment.