Package org.apache.continuum.taskqueue

Examples of org.apache.continuum.taskqueue.CheckOutTask


        recordStartOfCheckoutProjectSequence();
               
        final List<Task> tasks = new ArrayList<Task>();
       
        final List<Task> tasksInFirstCheckoutQueue = new ArrayList<Task>();
        tasksInFirstCheckoutQueue.add( new CheckOutTask( 1, new File( getBasedir(), "/target/test-working-dir/1" ),
                                                 "continuum-project-test-1", "dummy", "dummypass" ) );
       
        context.checking( new Expectations()
        {
            {
View Full Code Here


       
        final List<Task> buildTasks = new ArrayList<Task>();
        buildTasks.add( new BuildProjectTask2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null ) );
       
        final List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
        checkoutTasks.add( new CheckOutTask( 2, new File( getBasedir(), "/target/test-working-dir/1" ), "continuum-project-test-2",
                                          "dummy", "dummypass" ) );
       
        final ParallelBuildsThreadedTaskQueueExecutor buildTaskQueueExecutor = context.mock( ParallelBuildsThreadedTaskQueueExecutor.class, "parallel-build-task-executor" );
        final ParallelBuildsThreadedTaskQueueExecutor checkoutTaskQueueExecutor = context.mock( ParallelBuildsThreadedTaskQueueExecutor.class, "parallel-checkout-task-executor" );
       
View Full Code Here

        final List<Task> buildTasks = new ArrayList<Task>();
        buildTasks.add( new BuildProjectTask2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null ) );
       
        final List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
        checkoutTasks.add( new CheckOutTask( 2, new File( getBasedir(), "/target/test-working-dir/1" ), "continuum-project-test-2",
                                          "dummy", "dummypass" ) );
       
        try
        {
            context.checking( new Expectations()
View Full Code Here

        throws Exception
    {
        setupMockOverallBuildQueues();
       
        final List<Task> tasks = new ArrayList<Task>();
        tasks.add( new CheckOutTask( 2, new File( getBasedir(), "/target/test-working-dir/1" ), "continuum-project-test-2",
                                     "dummy", "dummypass" ) );
       
        context.checking( new Expectations() 
        {
            {
View Full Code Here

                // current checkouts
                Map<String, Task> currentCheckouts = getContinuum().getBuildsManager().getCurrentCheckouts();
                Set<String> keySet = currentCheckouts.keySet();
                for ( String key : keySet )
                {
                    CheckOutTask checkoutTask = (CheckOutTask) currentCheckouts.get( key );
                    currentCheckoutTasks.put( key, checkoutTask );
                }
            }
            catch ( BuildManagerException e )
            {
                addActionError( e.getMessage() );
                return ERROR;
            }

            try
            {
                // queued checkouts
                Map<String, List<Task>> checkouts = getContinuum().getBuildsManager().getProjectsInCheckoutQueues();
                Set<String> keySet = checkouts.keySet();
                for ( String key : keySet )
                {
                    List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
                    for ( Task task : checkouts.get( key ) )
                    {
                        CheckOutTask checkoutTask = (CheckOutTask) task;
                        checkoutTasks.add( checkoutTask );
                    }
                    checkoutsInQueue.put( key, checkoutTasks );
                }
            }
View Full Code Here

        final List<Task> tasks = new ArrayList<Task>();

        final List<Task> tasksInFirstCheckoutQueue = new ArrayList<Task>();
        tasksInFirstCheckoutQueue.add(
            new CheckOutTask( 1, new File( getBasedir(), "/target/test-working-dir/1" ), "continuum-project-test-1",
                              "dummy", "dummypass" ) );

        context.checking( new Expectations()
        {
            {
View Full Code Here

        final List<Task> buildTasks = new ArrayList<Task>();
        buildTasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 2 ) );

        final List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
        checkoutTasks.add(
            new CheckOutTask( 2, new File( getBasedir(), "/target/test-working-dir/1" ), "continuum-project-test-2",
                              "dummy", "dummypass" ) );

        final ParallelBuildsThreadedTaskQueueExecutor buildTaskQueueExecutor =
            context.mock( ParallelBuildsThreadedTaskQueueExecutor.class, "parallel-build-task-executor" );
        final ParallelBuildsThreadedTaskQueueExecutor checkoutTaskQueueExecutor =
View Full Code Here

        final List<BuildProjectTask> buildTasks = new ArrayList<BuildProjectTask>();
        buildTasks.add( new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF", null, 2 ) );

        final List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
        checkoutTasks.add(
            new CheckOutTask( 2, new File( getBasedir(), "/target/test-working-dir/1" ), "continuum-project-test-2",
                              "dummy", "dummypass" ) );

        try
        {
            context.checking( new Expectations()
View Full Code Here

    {
        setupMockOverallBuildQueues();

        final List<Task> tasks = new ArrayList<Task>();
        tasks.add(
            new CheckOutTask( 2, new File( getBasedir(), "/target/test-working-dir/1" ), "continuum-project-test-2",
                              "dummy", "dummypass" ) );

        context.checking( new Expectations()
        {
            {
View Full Code Here

     * @see OverallBuildQueue#cancelCheckoutTask(int)
     */
    public void cancelCheckoutTask( int projectId )
        throws TaskQueueException
    {
        CheckOutTask task = (CheckOutTask) checkoutTaskQueueExecutor.getCurrentTask();
        if ( task != null && task.getProjectId() == projectId )
        {
            log.info( "Cancelling checkout task for project '" + projectId + "' in task executor '" +
                checkoutTaskQueueExecutor );
            checkoutTaskQueueExecutor.cancelTask( task );
        }
View Full Code Here

TOP

Related Classes of org.apache.continuum.taskqueue.CheckOutTask

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.