Package org.codehaus.plexus.taskqueue

Examples of org.codehaus.plexus.taskqueue.Task


    // checkout queue

    public void testAddToCheckoutQueue()
        throws Exception
    {
        final Task checkoutTask =
            new CheckOutTask( 1, new File( getBasedir(), "/target/test-working-dir/1" ), "continuum-project-test-1",
                              "dummy", "dummypass" );
        final TaskQueue checkoutQueue = context.mock( TaskQueue.class, "checkout-queue" );

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


    }

    public void testRemoveProjectFromCheckoutQueue()
        throws Exception
    {
        final Task checkoutTask =
            new CheckOutTask( 1, new File( getBasedir(), "/target/test-working-dir/1" ), "continuum-project-test-1",
                              "dummy", "dummypass" );
        final TaskQueue checkoutQueue = context.mock( TaskQueue.class, "checkout-queue" );
        final List<Task> tasks = new ArrayList<Task>();
        tasks.add( checkoutTask );
View Full Code Here

    // build queue

    public void testAddToBuildQueue()
        throws Exception
    {
        final Task buildTask = new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF" );
        final TaskQueue buildQueue = context.mock( TaskQueue.class, "build-queue" );

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

    }

    public void testCancelBuildTask()
        throws Exception
    {
        final Task buildTask = new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF" );

        context.checking( new Expectations()
        {
            {
                one( buildTaskQueueExecutor ).getCurrentTask();
View Full Code Here

    }

    public void testCancelCurrentBuild()
        throws Exception
    {
        final Task buildTask = new BuildProjectTask( 2, 1, 1, "continuum-project-test-2", "BUILD_DEF" );

        context.checking( new Expectations()
        {
            {
                one( buildTaskQueueExecutor ).getCurrentTask();
View Full Code Here

    }

    public void testRemoveProjectFromBuildQueue()
        throws Exception
    {
        final Task buildTask = new BuildProjectTask( 1, 1, 1, "continuum-project-test-2", "BUILD_DEF" );

        final TaskQueue buildQueue = context.mock( TaskQueue.class, "build-queue" );
        final List<Task> tasks = new ArrayList<Task>();
        tasks.add( buildTask );
View Full Code Here

        public void run()
        {
            while ( command != SHUTDOWN )
            {
                final Task task;

                currentTask = null;

                try
                {
View Full Code Here

    }

    public int getCurrentProjectInBuilding()
        throws TaskQueueManagerException
    {
        Task task = getBuildTaskQueueExecutor().getCurrentTask();
        if ( task != null )
        {
            if ( task instanceof BuildProjectTask )
            {
                return ( (BuildProjectTask) task ).getProjectId();
View Full Code Here

    }

    private boolean cancelCurrentBuild()
        throws TaskQueueManagerException
    {
        Task task = getBuildTaskQueueExecutor().getCurrentTask();
       
        if ( task != null )
        {
            if ( task instanceof BuildProjectTask )
            {
View Full Code Here

    }

    private void assertNextBuildIs( int expectedProjectId )
        throws Exception
    {
        Task task = buildQueue.take();

        assertEquals( BuildProjectTask.class.getName(), task.getClass().getName() );

        BuildProjectTask buildProjectTask = (BuildProjectTask) task;

        assertEquals( "Didn't get the expected project id.", expectedProjectId, buildProjectTask.getProjectId() );
    }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.taskqueue.Task

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.