public void testMixedTransitiveSnapshotTrigger() throws Exception {
configureDefaultMaven();
MavenModuleSet projA = createMavenProject("snap-dep-test-up");
projA.setGoals("clean install");
projA.setScm(new ExtractResourceSCM(getClass().getResource("maven-dep-test-A.zip")));
MavenModuleSet projB = createMavenProject("snap-dep-test-mid");
projB.setGoals("clean install");
projB.setIgnoreUpstremChanges(false);
projB.setQuietPeriod(0);
projB.setScm(new ExtractResourceSCM(getClass().getResource("maven-dep-test-B.zip")));
MavenModuleSet projC = createMavenProject("snap-dep-test-down");
projC.setGoals("clean install");
projC.setIgnoreUpstremChanges(false);
projC.setQuietPeriod(0);
projC.setScm(new ExtractResourceSCM(getClass().getResource("maven-dep-test-C.zip")));
buildAndAssertSuccess(projA);
buildAndAssertSuccess(projB);
buildAndAssertSuccess(projC);
projA.setScm(new ExtractResourceSCM(getClass().getResource("maven-dep-test-A-changed.zip")));
buildAndAssertSuccess(projA);
waitUntilNoActivityUpTo(90*1000); // wait until dependency build trickles down
assertEquals("Expected most recent build of second project to be #2", 2, projB.getLastBuild().getNumber());