projectB.setQuietPeriod(5);
// set to build on slave1
projectB.setAssignedNode(slave1);
hudson.rebuildDependencyGraph();
AbstractBuild buildA = projectA.scheduleBuild2(0).get();
// Now trigger on another slave
projectA.setAssignedNode(slave2);
AbstractBuild buildA2 = projectA.scheduleBuild2(0).get();
waitUntilNoActivity();
assertEquals(slave0, buildA.getBuiltOn());
assertEquals(slave2, buildA2.getBuiltOn());
// should have two builds of projectB
assertEquals(2, projectB.getBuilds().size());
AbstractBuild buildB = (AbstractBuild)projectB.getBuildByNumber(firstBuildNumber);
assertNotNull("ProjectB failed to build", buildB);
assertEquals(slave0, buildB.getBuiltOn());
// get the second build of projectB
AbstractBuild buildB2 = (AbstractBuild)buildB.getNextBuild();
assertNotNull("ProjectB failed to build second time", buildB2);
assertEquals(slave2, buildB2.getBuiltOn());
}