Skip to content
Permalink
Browse files

[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 9687602edf2ae8ee82a6a0810ee7007d8d86226f
Showing with 16 additions and 2 deletions.
  1. +16 −2 src/test/java/hudson/maven/MavenSnapshotTriggerTest.java
@@ -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")));

0 comments on commit 9687602

Please sign in to comment.
You can’t perform that action at this time.