Package hudson.model.Queue

Examples of hudson.model.Queue.JobOffer


        when(t.getSubTasks()).thenReturn((Collection) asList(t));


        Computer c = createMockComputer(1);

        JobOffer o = createMockOffer(c.getExecutors().get(0));

        MappingWorksheet mw = new MappingWorksheet(wrap(t), asList(o));

        // the test load predictor should have pushed down the executor count to 0
        assertTrue(mw.executors.isEmpty());
View Full Code Here


        Executor e = c.getExecutors().get(0);

        when(e.isIdle()).thenReturn(false);
        when(e.getEstimatedRemainingTimeMillis()).thenReturn(300L);

        JobOffer o = createMockOffer(c.getExecutors().get(1));

        MappingWorksheet mw = new MappingWorksheet(wrap(t), asList(o));

        // since the currently busy executor will free up before a future predicted load starts,
        // we should have a valid executor remain in the queue
View Full Code Here

        assertEquals(1,mw.executors.size());
        assertEquals(1,mw.works.size());
    }

    private JobOffer createMockOffer(Executor e) throws NoSuchFieldException, IllegalAccessException {
        JobOffer o = mock(JobOffer.class);
        when(o.getExecutor()).thenReturn(e);
        return o;
    }
View Full Code Here

TOP

Related Classes of hudson.model.Queue.JobOffer

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.