@Bug(6779)
 public void testDeleteSetBuildDeletesModuleBuilds() throws Exception {
   MavenModuleSet project = createProject("maven-multimod.zip");
   project.setLocalRepository(new DefaultLocalRepositoryLocator());
   project.setGoals("install");
   buildAndAssertSuccess(project);
   buildAndAssertSuccess(project.getModule("org.jvnet.hudson.main.test.multimod:moduleB"));
   buildAndAssertSuccess(project);
   assertEquals(2, project.getBuilds().size()); // Module build does not add a ModuleSetBuild
   project.getFirstBuild().delete();
   // A#1, B#1 and B#2 should all be deleted too
   assertEquals(
       1, project.getModule("org.jvnet.hudson.main.test.multimod:moduleA").getBuilds().size());
   assertEquals(
       1, project.getModule("org.jvnet.hudson.main.test.multimod:moduleB").getBuilds().size());
 }
  /** Check if the generated site is linked correctly for multi module projects. */
  public void testMultiModuleSiteBuild() throws Exception {
    MavenModuleSet project = createProject("maven-multimodule-site.zip");
    project.setGoals("site");

    try {
      buildAndAssertSuccess(project);
    } catch (InterruptedException x) {
      // jglick: when using M2 this just hangs on my machine (pool-*-thread-* in
      // java.net.SocketInputStream.socketRead0); sometimes passes in M3, but not consistently, and
      // very very slowly when it does (network dependency)
      return; // TODO use JenkinsRule and throw AssumptionViolatedException
    }

    // this should succeed
    HudsonTestCase.WebClient wc = new WebClient();
    wc.getPage(project, "site");
    wc.getPage(project, "site/core");
    wc.getPage(project, "site/client");

    // @Bug(7577): check that site generation succeeds also if only a single module is build
    MavenModule coreModule = project.getModule("mmtest:core");
    Assert.assertEquals("site", coreModule.getGoals());
    try {
      buildAndAssertSuccess(coreModule);
    } catch (InterruptedException x) {
      return; // TODO as above
    }
    wc.getPage(project, "site/core");
  }