Hey all, I'm currently writing a plugin where I need to write integration tests which rely on build trigger behavior. For some context, I'm using the JenkinsRule object for testing.
Say I have job A and job B. Job B is a downstream job from job A. I've created a BuildTrigger in my test which is added to job A like this: Enter code here... List<AbstractProject> downstreamJobs = new ArrayList<AbstractProject>(); downstreamJobs.add(jobB); jobA.getPublishersList().add(new BuildTrigger(downstreamJobs, Result.SUCCESS)); j.jenkins.rebuildDependencyGraph(); Now I'd like to schedule a build for job A and block until job B has completed. The problem I'm running in to is that my test will only block on job A but not job B. I schedule job A like this: Enter code here... FreeStyleBuild jobABuild = jobA.scheduleBuild2(0, c, params).get(); This call of schedulebuild2 returns a future. I then block until the build has completed. I'd then like the test to block on job B, but I'm not sure how to do that. I'd really like to know if there's a blessed way for the test to block until all downstream jobs are completed or if I should take a different approach all together. Thanks. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/39aac0b9-0187-4886-ac35-e18b5242177a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.