Package org.nimbustools.api.repr

Examples of org.nimbustools.api.repr.Caller


    @Test
    @DirtiesContext
    public void simpleBackfillTest() throws Exception {
        Manager rm = this.locator.getManager();
        Caller superuser = this.populator().getSuperuserCaller();

        logger.info(rm.getVMMReport());

        logger.debug("Submitting backfill requests..");
View Full Code Here


    @Test
    @DirtiesContext
    public void simpleBackfillPreemptionTest() throws Exception {
        Manager rm = this.locator.getManager();
        Caller superuser = this.populator().getSuperuserCaller();

        logger.debug("Submitting backfill requests..");

        AsyncCreateRequest backfill1 = this.populator().getBackfillRequest("backfill1", 3);
        RequestInfo backfill1Result = rm.addBackfillRequest(backfill1, superuser);
        AsyncCreateRequest backfill2 = this.populator().getBackfillRequest("backfill2", 5);
        RequestInfo backfill2Result = rm.addBackfillRequest(backfill2, superuser);

        logger.debug("Waiting 2 seconds for resources to be allocated.");
        Thread.sleep(2000);

        // Check backfill request state
        RequestInfo[] backfillRequestsByCaller = rm.getBackfillRequestsByCaller(superuser);
        assertEquals(2, backfillRequestsByCaller.length);

        logger.info(rm.getVMMReport());

        // Three regular VMs should preempt
        Caller caller = this.populator().getCaller();
        CreateRequest req = this.populator().getCreateRequest("regular", 1200, 256 , 3);
        rm.create(req, caller);

        logger.debug("Waiting 2 seconds for resources to be allocated.");
        Thread.sleep(2000);
View Full Code Here

        logger.debug("singleRequest");

        Calendar ts1 = Calendar.getInstance();

        //Objects and requests setup
        Caller caller = this.populator().getCaller();
        Caller superuser = this.populator().getSuperuserCaller();
        Manager rm = this.locator.getManager();

        Double previousPrice = rm.getSpotPrice();

        logger.debug("Submitting backfill request..");
View Full Code Here

        //Objects and requests setup

        Manager rm = this.locator.getManager();

        Caller caller1 = this.populator().getCaller();
        Caller caller2 = this.populator().getCaller();
        Caller caller3 = this.populator().getCaller();
        Caller superuser = this.populator().getSuperuserCaller();

        logger.debug("Submitting backfill requests..");

        AsyncCreateRequest backfill1 = this.populator().getBackfillRequest("backfill1", 3);
        RequestInfo backfill1Result = rm.addBackfillRequest(backfill1, superuser);
View Full Code Here

        //Objects and requests setup

        Manager rm = this.locator.getManager();

        Caller siCaller = this.populator().getCaller();
        Caller wsCaller = this.populator().getCaller();

        Double previousPrice = rm.getSpotPrice();

        final Double lowBid = previousPrice + 1;
        final Double mediumBid = previousPrice + 3;
View Full Code Here

    @Test
    @DirtiesContext
    public void singleInstancePreemption() throws Exception {
        Manager rm = this.locator.getManager();
        Caller superuser = this.populator().getSuperuserCaller();

        logger.info(rm.getVMMReport());

        logger.debug("Submitting backfill request");

        AsyncCreateRequest backfill1 = this.populator().getBackfillRequest("backfill1", 1);
        RequestInfo backfill1Result = rm.addBackfillRequest(backfill1, superuser);

        logger.debug("Waiting 2 seconds for resources to be allocated.");
        Thread.sleep(2000);

        // Check backfill request state
        RequestInfo[] backfillRequestsByCaller = rm.getBackfillRequestsByCaller(superuser);
        assertEquals(1, backfillRequestsByCaller.length);

        logger.info(rm.getVMMReport());

        // One regular VM that needs all the 512 RAM should preempt
        Caller caller = this.populator().getCaller();
        CreateRequest req = this.populator().getCreateRequest("regular", 1200, 512 , 1);
        rm.create(req, caller);

        logger.debug("Waiting 2 seconds for resources to be allocated.");
        Thread.sleep(2000);
View Full Code Here

    @Test
    @DirtiesContext
    public void tooMuchMemory() throws Exception {
        final Manager rm = this.locator.getManager();
        final Caller caller = this.populator().getCaller();
        final CreateRequest request =
                this.populator().getCreateRequest("suite:issue26:tooMuchMemory", 240, 3584, 1);
        boolean impossibleMemory = false;
        try {
            final CreateResult result = rm.create(request, caller);
View Full Code Here

    @Test
    @DirtiesContext
    public void backfillWontDie() throws Exception {
        Manager rm = this.locator.getManager();
        Caller superuser = this.populator().getSuperuserCaller();

        logger.info(rm.getVMMReport());

        logger.debug("Submitting backfill request");

        AsyncCreateRequest backfill1 = this.populator().getBackfillRequest("backfill1", 1);
        RequestInfo backfill1Result = rm.addBackfillRequest(backfill1, superuser);

        logger.debug("Waiting 2 seconds for resources to be allocated.");
        Thread.sleep(2000);

        // Check backfill request state
        RequestInfo[] backfillRequestsByCaller = rm.getBackfillRequestsByCaller(superuser);
        assertEquals(1, backfillRequestsByCaller.length);

        logger.info(rm.getVMMReport());

        // Set the shutdown task to not work
        MockShutdownTrash.resetFailCount();
        MockShutdownTrash.setFail(true);
        logger.warn("Set to fail.");

        // One regular VM that needs all the 512 RAM will preempt
        Caller caller = this.populator().getCaller();
        CreateRequest req = this.populator().getCreateRequest("regular", 1200, 512 , 1);

        final long startMs = System.currentTimeMillis();

        boolean notEnoughMemory = false;
View Full Code Here

        @Test
    @DirtiesContext
    public void backfillEventuallyDies() throws Exception {
        Manager rm = this.locator.getManager();
        Caller superuser = this.populator().getSuperuserCaller();

        logger.info(rm.getVMMReport());

        logger.debug("Submitting backfill request");

        AsyncCreateRequest backfill1 = this.populator().getBackfillRequest("backfill1", 1);
        RequestInfo backfill1Result = rm.addBackfillRequest(backfill1, superuser);

        logger.debug("Waiting 2 seconds for resources to be allocated.");
        Thread.sleep(2000);

        // Check backfill request state
        RequestInfo[] backfillRequestsByCaller = rm.getBackfillRequestsByCaller(superuser);
        assertEquals(1, backfillRequestsByCaller.length);

        logger.info(rm.getVMMReport());

        // Set the shutdown task to not work
        MockShutdownTrash.resetFailCount();
        MockShutdownTrash.setFail(true);
        logger.warn("Set to fail.");

        // One regular VM that needs all the 512 RAM will preempt
        Caller caller = this.populator().getCaller();
        CreateRequest req = this.populator().getCreateRequest("regular", 1200, 512 , 1);

        // In 10 seconds, trigger the shutdown task to start succeeding
        this.suiteExecutor.submit(new DestroyEnableFutureTask(10));
View Full Code Here

    @Test
    @DirtiesContext
    public void singleRequest() throws Exception {
        logger.debug("singleRequest");

        Caller caller = this.populator().getCaller();
        Manager rm = this.locator.getManager();
       
        Double previousPrice = rm.getSpotPrice();
       
        final Double bid = previousPrice + 1;
View Full Code Here

TOP

Related Classes of org.nimbustools.api.repr.Caller

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.