Package org.apache.continuum.dao

Examples of org.apache.continuum.dao.BuildResultDao


        String toOverride = "recipient@host.com";
        notifier.setToOverride( toOverride );

        ProjectGroup group = createStubProjectGroup( "foo.bar", "" );

        BuildResultDao brDao = (BuildResultDao) lookup( BuildResultDao.class );
        Project project = addProject( "Test Project", group );
        BuildResult br = makeBuild( ContinuumProjectState.FAILED );
        brDao.addBuildResult( project, br );

        br = makeBuild( ContinuumProjectState.OK );
        brDao.addBuildResult( project, br );

        br = makeBuild( ContinuumProjectState.FAILED );
        brDao.addBuildResult( project, br );

        BuildResult build = makeBuild( ContinuumProjectState.OK );
        assertEquals( ContinuumProjectState.OK, build.getState() );

        project.setState( build.getState() );
        getProjectDao().updateProject( project );

        BuildDefinition buildDef = new BuildDefinition();
        buildDef.setType( "maven2" );
        buildDef.setBuildFile( "pom.xml" );
        buildDef.setGoals( "clean install" );
        buildDef.setArguments( "" );
        BuildDefinitionDao buildDefDao = (BuildDefinitionDao) lookup( BuildDefinitionDao.class );
        buildDef = buildDefDao.addBuildDefinition( buildDef );
        build.setBuildDefinition( buildDef );
        assertEquals( ContinuumProjectState.OK, build.getState() );

        brDao.addBuildResult( project, build );
        build = brDao.getLatestBuildResultForProjectWithDetails( project.getId() );
        assertEquals( ContinuumProjectState.OK, build.getState() );

        MimeMessage mailMessage =
            sendNotificationAndGetMessage( project, build, buildDef, "lots out build output", toOverride );
View Full Code Here


    {
        super.setUp();

        BuildDefinitionDao buildDefinitionDao = (BuildDefinitionDao) lookup( BuildDefinitionDao.class.getName() );

        BuildResultDao buildResultDao = (BuildResultDao) lookup( BuildResultDao.class.getName() );

        Project project1 = createProject( "project1" );
        BuildDefinition bd1 = createBuildDefinition();
        project1.addBuildDefinition( bd1 );
        project1.setState( ContinuumProjectState.OK );
        projectId1 = addProject( project1 ).getId();
        buildDefinitionId1 = buildDefinitionDao.getDefaultBuildDefinition( projectId1 ).getId();
        project1 = getProjectDao().getProject( projectId1 );
        BuildResult buildResult1 = new BuildResult();
        buildResult1.setStartTime( Calendar.getInstance().getTimeInMillis() );
        buildResult1.setEndTime( Calendar.getInstance().getTimeInMillis() );
        buildResult1.setState( ContinuumProjectState.OK );
        buildResult1.setSuccess( true );
        buildResult1.setBuildDefinition( bd1 );
        buildResultDao.addBuildResult( project1, buildResult1 );
        BuildResult buildResult2 = new BuildResult();
        buildResult2.setStartTime( Calendar.getInstance().getTimeInMillis() - 7200000 );
        buildResult2.setEndTime( Calendar.getInstance().getTimeInMillis() - 7200000 );
        buildResult2.setSuccess( true );
        buildResult2.setState( ContinuumProjectState.OK );
        buildResult2.setBuildDefinition( bd1 );
        buildResultDao.addBuildResult( project1, buildResult2 );
        createPomFile( getProjectDao().getProjectWithAllDetails( projectId1 ) );

        Project project2 = createProject( "project2" );
        ProjectDependency dep1 = new ProjectDependency();
        dep1.setGroupId( "org.apache.maven.testproject" );
View Full Code Here

    {
        super.setUp();

        BuildDefinitionDao buildDefinitionDao = (BuildDefinitionDao) lookup( BuildDefinitionDao.class.getName() );

        BuildResultDao buildResultDao = (BuildResultDao) lookup( BuildResultDao.class.getName() );

        Project project1 = createProject( "project1" );
        BuildDefinition bd1 = createBuildDefinition();
        project1.addBuildDefinition( bd1 );
        project1.setState( ContinuumProjectState.OK );
        projectId1 = addProject( project1 ).getId();
        buildDefinitionId1 = buildDefinitionDao.getDefaultBuildDefinition( projectId1 ).getId();
        project1 = getProjectDao().getProject( projectId1 );
        BuildResult buildResult1 = new BuildResult();
        buildResult1.setStartTime( Calendar.getInstance().getTimeInMillis() );
        buildResult1.setEndTime( Calendar.getInstance().getTimeInMillis() );
        buildResult1.setState( ContinuumProjectState.OK );
        buildResult1.setSuccess( true );
        buildResult1.setBuildDefinition( bd1 );
        buildResultDao.addBuildResult( project1, buildResult1 );
        BuildResult buildResult2 = new BuildResult();
        buildResult2.setStartTime( Calendar.getInstance().getTimeInMillis() - 7200000 );
        buildResult2.setEndTime( Calendar.getInstance().getTimeInMillis() - 7200000 );
        buildResult2.setSuccess( true );
        buildResult2.setState( ContinuumProjectState.OK );
        buildResult2.setBuildDefinition( bd1 );
        buildResultDao.addBuildResult( project1, buildResult2 );
        createPomFile( getProjectDao().getProjectWithAllDetails( projectId1 ) );

        Project project2 = createProject( "project2" );
        ProjectDependency dep1 = new ProjectDependency();
        dep1.setGroupId( "org.apache.maven.testproject" );
View Full Code Here

        String toOverride = "recipient@host.com";
        notifier.setToOverride( toOverride );

        ProjectGroup group = createStubProjectGroup( "foo.bar", "" );

        BuildResultDao brDao = (BuildResultDao) lookup( BuildResultDao.class );
        Project project = addProject( "Test Project", group );
        BuildResult br = makeBuild( ContinuumProjectState.FAILED );
        brDao.addBuildResult( project, br );

        br = makeBuild( ContinuumProjectState.OK );
        brDao.addBuildResult( project, br );

        br = makeBuild( ContinuumProjectState.FAILED );
        brDao.addBuildResult( project, br );

        BuildResult build = makeBuild( ContinuumProjectState.OK );
        assertEquals( ContinuumProjectState.OK, build.getState() );

        project.setState( build.getState() );
        getProjectDao().updateProject( project );

        BuildDefinition buildDef = new BuildDefinition();
        buildDef.setType( "maven2" );
        buildDef.setBuildFile( "pom.xml" );
        buildDef.setGoals( "clean install" );
        buildDef.setArguments( "" );
        BuildDefinitionDao buildDefDao = (BuildDefinitionDao) lookup( BuildDefinitionDao.class );
        buildDef = buildDefDao.addBuildDefinition( buildDef );
        build.setBuildDefinition( buildDef );
        assertEquals( ContinuumProjectState.OK, build.getState() );

        brDao.addBuildResult( project, build );
        build = brDao.getLatestBuildResultForProjectWithDetails( project.getId() );
        assertEquals( ContinuumProjectState.OK, build.getState() );

        MimeMessage mailMessage = sendNotificationAndGetMessage( project, build, buildDef, "lots out build output",
                                                                 toOverride );
View Full Code Here

    {
        super.setUp();

        BuildDefinitionDao buildDefinitionDao = (BuildDefinitionDao) lookup( BuildDefinitionDao.class.getName() );

        BuildResultDao buildResultDao = (BuildResultDao) lookup( BuildResultDao.class.getName() );

        Project project1 = createProject( "project1" );
        BuildDefinition bd1 = createBuildDefinition();
        project1.addBuildDefinition( bd1 );
        project1.setState( ContinuumProjectState.OK );
        projectId1 = addProject( project1 ).getId();
        buildDefinitionId1 = buildDefinitionDao.getDefaultBuildDefinition( projectId1 ).getId();
        project1 = getProjectDao().getProject( projectId1 );
        BuildResult buildResult1 = new BuildResult();
        buildResult1.setStartTime( Calendar.getInstance().getTimeInMillis() );
        buildResult1.setEndTime( Calendar.getInstance().getTimeInMillis() );
        buildResult1.setState( ContinuumProjectState.OK );
        buildResult1.setSuccess( true );
        buildResult1.setBuildDefinition( bd1 );
        buildResultDao.addBuildResult( project1, buildResult1 );
        BuildResult buildResult2 = new BuildResult();
        buildResult2.setStartTime( Calendar.getInstance().getTimeInMillis() - 7200000 );
        buildResult2.setEndTime( Calendar.getInstance().getTimeInMillis() - 7200000 );
        buildResult2.setSuccess( true );
        buildResult2.setState( ContinuumProjectState.OK );
        buildResult2.setBuildDefinition( bd1 );
        buildResultDao.addBuildResult( project1, buildResult2 );
        createPomFile( getProjectDao().getProjectWithAllDetails( projectId1 ) );

        Project project2 = createProject( "project2" );
        ProjectDependency dep1 = new ProjectDependency();
        dep1.setGroupId( "org.apache.maven.testproject" );
View Full Code Here

    {
        super.setUp();

        BuildDefinitionDao buildDefinitionDao = (BuildDefinitionDao) lookup( BuildDefinitionDao.class.getName() );

        BuildResultDao buildResultDao = (BuildResultDao) lookup( BuildResultDao.class.getName() );

        Project project1 = createProject( "project1" );
        BuildDefinition bd1 = createBuildDefinition();
        project1.addBuildDefinition( bd1 );
        project1.setState( ContinuumProjectState.OK );
        projectId1 = addProject( project1 ).getId();
        buildDefinitionId1 = buildDefinitionDao.getDefaultBuildDefinition( projectId1 ).getId();
        project1 = getProjectDao().getProject( projectId1 );
        BuildResult buildResult1 = new BuildResult();
        buildResult1.setStartTime( Calendar.getInstance().getTimeInMillis() );
        buildResult1.setEndTime( Calendar.getInstance().getTimeInMillis() );
        buildResult1.setState( ContinuumProjectState.OK );
        buildResult1.setSuccess( true );
        buildResult1.setBuildDefinition( bd1 );
        buildResultDao.addBuildResult( project1, buildResult1 );
        BuildResult buildResult2 = new BuildResult();
        buildResult2.setStartTime( Calendar.getInstance().getTimeInMillis() - 7200000 );
        buildResult2.setEndTime( Calendar.getInstance().getTimeInMillis() - 7200000 );
        buildResult2.setSuccess( true );
        buildResult2.setState( ContinuumProjectState.OK );
        buildResult2.setBuildDefinition( bd1 );
        buildResultDao.addBuildResult( project1, buildResult2 );
        createPomFile( getProjectDao().getProjectWithAllDetails( projectId1 ) );

        Project project2 = createProject( "project2" );
        ProjectDependency dep1 = new ProjectDependency();
        dep1.setGroupId( "org.apache.maven.testproject" );
View Full Code Here

        String toOverride = "recipient@host.com";
        notifier.setToOverride( toOverride );

        ProjectGroup group = createStubProjectGroup( "foo.bar", "" );

        BuildResultDao brDao = (BuildResultDao) lookup( BuildResultDao.class );
        Project project = addProject( "Test Project", group );
        BuildResult br = makeBuild( ContinuumProjectState.FAILED );
        brDao.addBuildResult( project, br );

        br = makeBuild( ContinuumProjectState.OK );
        brDao.addBuildResult( project, br );

        br = makeBuild( ContinuumProjectState.FAILED );
        brDao.addBuildResult( project, br );

        BuildResult build = makeBuild( ContinuumProjectState.OK );
        assertEquals( ContinuumProjectState.OK, build.getState() );

        project.setState( build.getState() );
        getProjectDao().updateProject( project );

        BuildDefinition buildDef = new BuildDefinition();
        buildDef.setType( "maven2" );
        buildDef.setBuildFile( "pom.xml" );
        buildDef.setGoals( "clean install" );
        buildDef.setArguments( "" );
        BuildDefinitionDao buildDefDao = (BuildDefinitionDao) lookup( BuildDefinitionDao.class );
        buildDef = buildDefDao.addBuildDefinition( buildDef );
        build.setBuildDefinition( buildDef );
        assertEquals( ContinuumProjectState.OK, build.getState() );

        brDao.addBuildResult( project, build );
        build = brDao.getLatestBuildResultForProjectWithDetails( project.getId() );
        assertEquals( ContinuumProjectState.OK, build.getState() );

        MimeMessage mailMessage =
            sendNotificationAndGetMessage( project, build, buildDef, "lots out build output", toOverride );
View Full Code Here

    {
        super.setUp();

        BuildDefinitionDao buildDefinitionDao = (BuildDefinitionDao) lookup( BuildDefinitionDao.class.getName() );

        BuildResultDao buildResultDao = (BuildResultDao) lookup( BuildResultDao.class.getName() );

        Project project1 = createProject( "project1" );
        BuildDefinition bd1 = createBuildDefinition();
        project1.addBuildDefinition( bd1 );
        project1.setState( ContinuumProjectState.OK );
        projectId1 = addProject( project1 ).getId();
        buildDefinitionId1 = buildDefinitionDao.getDefaultBuildDefinition( projectId1 ).getId();
        project1 = getProjectDao().getProject( projectId1 );
        BuildResult buildResult1 = new BuildResult();
        buildResult1.setStartTime( Calendar.getInstance().getTimeInMillis() );
        buildResult1.setEndTime( Calendar.getInstance().getTimeInMillis() );
        buildResult1.setState( ContinuumProjectState.OK );
        buildResult1.setSuccess( true );
        buildResult1.setBuildDefinition( bd1 );
        buildResultDao.addBuildResult( project1, buildResult1 );
        BuildResult buildResult2 = new BuildResult();
        buildResult2.setStartTime( Calendar.getInstance().getTimeInMillis() - 7200000 );
        buildResult2.setEndTime( Calendar.getInstance().getTimeInMillis() - 7200000 );
        buildResult2.setSuccess( true );
        buildResult2.setState( ContinuumProjectState.OK );
        buildResult2.setBuildDefinition( bd1 );
        buildResultDao.addBuildResult( project1, buildResult2 );
        createPomFile( getProjectDao().getProjectWithAllDetails( projectId1 ) );

        Project project2 = createProject( "project2" );
        ProjectDependency dep1 = new ProjectDependency();
        dep1.setGroupId( "org.apache.maven.testproject" );
View Full Code Here

TOP

Related Classes of org.apache.continuum.dao.BuildResultDao

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.