}
public void testCheckoutPrepareBuildMultiModuleProjectFreshBuild()
throws Exception
{
PrepareBuildProjectsTask task = createTask( "src/test-projects/multi-module/pom.xml", false, true );
this.prepareBuildQueue.put( task );
List<Project> projects = getProjectDao().getProjectsInGroup( task.getProjectGroupId() );
assertEquals( "failed to add all projects", 3, projects.size() );
Project rootProject = getProjectDao().getProjectByName( "multi-module-parent" );
Project moduleA = getProjectDao().getProjectByName( "module-A" );
Project moduleB = getProjectDao().getProjectByName( "module-B" );
// wait while task finishes prepare build
while( !prepareBuildQueue.getQueueSnapshot().isEmpty() ||
prepareBuildTaskQueueExecutor.getCurrentTask() != null )
{
Thread.sleep( 10 );
}
ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );
File workingDir = configurationService.getWorkingDirectory();
assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", new File( workingDir, Integer.toString( rootProject.getId() ) ).exists() );