Package org.qzerver.model.domain.entities.job

Examples of org.qzerver.model.domain.entities.job.ScheduleExecution


        AutomaticJobExecutionParameters jobExecutionParameters = new AutomaticJobExecutionParameters();
        jobExecutionParameters.setScheduledTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.000 UTC"));
        jobExecutionParameters.setFiredTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.231 UTC"));
        jobExecutionParameters.setNextFireTime(null);

        ScheduleExecution scheduleExecution = scheduleJobExecutorService.executeAutomaticJob(scheduleJob.getId(),
            jobExecutionParameters);
        Assert.assertNotNull(scheduleExecution);

        control.verify();

        ScheduleExecutionNode scheduleExecutionNode;
        ScheduleExecutionResult scheduleExecutionResult;

        scheduleExecution = scheduleExecutionManagementService.findExecution(scheduleExecution.getId());
        Assert.assertEquals(ScheduleExecutionStatus.SUCCEED, scheduleExecution.getStatus());
        Assert.assertEquals(2, scheduleExecution.getNodes().size());
        Assert.assertEquals(2, scheduleExecution.getResults().size());

        scheduleExecutionNode =scheduleExecution.getNodes().get(0);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode2.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertTrue(scheduleExecutionResult.isSucceed());

        scheduleExecutionNode =scheduleExecution.getNodes().get(1);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode1.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertTrue(scheduleExecutionResult.isSucceed());
View Full Code Here


        AutomaticJobExecutionParameters jobExecutionParameters = new AutomaticJobExecutionParameters();
        jobExecutionParameters.setScheduledTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.000 UTC"));
        jobExecutionParameters.setFiredTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.231 UTC"));
        jobExecutionParameters.setNextFireTime(null);

        ScheduleExecution scheduleExecution = scheduleJobExecutorService.executeAutomaticJob(scheduleJob.getId(),
            jobExecutionParameters);
        Assert.assertNotNull(scheduleExecution);

        control.verify();

        ScheduleExecutionNode scheduleExecutionNode;
        ScheduleExecutionResult scheduleExecutionResult;

        scheduleExecution = scheduleExecutionManagementService.findExecution(scheduleExecution.getId());
        Assert.assertEquals(ScheduleExecutionStatus.SUCCEED, scheduleExecution.getStatus());
        Assert.assertEquals(1, scheduleExecution.getNodes().size());
        Assert.assertEquals(1, scheduleExecution.getResults().size());

        scheduleExecutionNode =scheduleExecution.getNodes().get(0);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode2.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertTrue(scheduleExecutionResult.isSucceed());
View Full Code Here

        AutomaticJobExecutionParameters jobExecutionParameters = new AutomaticJobExecutionParameters();
        jobExecutionParameters.setScheduledTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.000 UTC"));
        jobExecutionParameters.setFiredTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.231 UTC"));
        jobExecutionParameters.setNextFireTime(null);

        ScheduleExecution scheduleExecution = scheduleJobExecutorService.executeAutomaticJob(scheduleJob.getId(),
            jobExecutionParameters);
        Assert.assertNotNull(scheduleExecution);

        control.verify();

        ScheduleExecutionNode scheduleExecutionNode;
        ScheduleExecutionResult scheduleExecutionResult;

        scheduleExecution = scheduleExecutionManagementService.findExecution(scheduleExecution.getId());
        Assert.assertEquals(ScheduleExecutionStatus.FAILED, scheduleExecution.getStatus());
        Assert.assertEquals(2, scheduleExecution.getNodes().size());
        Assert.assertEquals(2, scheduleExecution.getResults().size());

        scheduleExecutionNode =scheduleExecution.getNodes().get(0);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode2.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertFalse(scheduleExecutionResult.isSucceed());

        scheduleExecutionNode =scheduleExecution.getNodes().get(1);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode1.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertTrue(scheduleExecutionResult.isSucceed());
View Full Code Here

        AutomaticJobExecutionParameters jobExecutionParameters = new AutomaticJobExecutionParameters();
        jobExecutionParameters.setScheduledTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.000 UTC"));
        jobExecutionParameters.setFiredTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.231 UTC"));
        jobExecutionParameters.setNextFireTime(null);

        ScheduleExecution scheduleExecution = scheduleJobExecutorService.executeAutomaticJob(scheduleJob.getId(),
            jobExecutionParameters);
        Assert.assertNotNull(scheduleExecution);

        control.verify();

        ScheduleExecutionNode scheduleExecutionNode;
        ScheduleExecutionResult scheduleExecutionResult;

        scheduleExecution = scheduleExecutionManagementService.findExecution(scheduleExecution.getId());
        Assert.assertEquals(ScheduleExecutionStatus.FAILED, scheduleExecution.getStatus());
        Assert.assertEquals(2, scheduleExecution.getNodes().size());
        Assert.assertEquals(2, scheduleExecution.getResults().size());

        scheduleExecutionNode =scheduleExecution.getNodes().get(0);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode2.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertFalse(scheduleExecutionResult.isSucceed());

        scheduleExecutionNode =scheduleExecution.getNodes().get(1);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode1.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertFalse(scheduleExecutionResult.isSucceed());
View Full Code Here

        AutomaticJobExecutionParameters jobExecutionParameters = new AutomaticJobExecutionParameters();
        jobExecutionParameters.setScheduledTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.000 UTC"));
        jobExecutionParameters.setFiredTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.231 UTC"));
        jobExecutionParameters.setNextFireTime(null);

        ScheduleExecution scheduleExecution = scheduleJobExecutorService.executeAutomaticJob(scheduleJob.getId(),
            jobExecutionParameters);
        Assert.assertNotNull(scheduleExecution);

        control.verify();

        ScheduleExecutionNode scheduleExecutionNode;
        ScheduleExecutionResult scheduleExecutionResult;

        scheduleExecution = scheduleExecutionManagementService.findExecution(scheduleExecution.getId());
        Assert.assertEquals(ScheduleExecutionStatus.EXCEPTION, scheduleExecution.getStatus());
        Assert.assertEquals(2, scheduleExecution.getNodes().size());
        Assert.assertEquals(1, scheduleExecution.getResults().size());

        scheduleExecutionNode =scheduleExecution.getNodes().get(0);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode2.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertFalse(scheduleExecutionResult.isSucceed());

        scheduleExecutionNode =scheduleExecution.getNodes().get(1);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode1.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNull(scheduleExecutionResult);
    }
View Full Code Here

        AutomaticJobExecutionParameters jobExecutionParameters = new AutomaticJobExecutionParameters();
        jobExecutionParameters.setScheduledTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.000 UTC"));
        jobExecutionParameters.setFiredTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.231 UTC"));
        jobExecutionParameters.setNextFireTime(null);

        ScheduleExecution scheduleExecution = scheduleJobExecutorService.executeAutomaticJob(scheduleJob.getId(),
            jobExecutionParameters);
        Assert.assertNotNull(scheduleExecution);

        control.verify();

        ScheduleExecutionNode scheduleExecutionNode;
        ScheduleExecutionResult scheduleExecutionResult;

        scheduleExecution = scheduleExecutionManagementService.findExecution(scheduleExecution.getId());
        Assert.assertEquals(ScheduleExecutionStatus.TIMEOUT, scheduleExecution.getStatus());
        Assert.assertEquals(2, scheduleExecution.getNodes().size());
        Assert.assertEquals(1, scheduleExecution.getResults().size());

        scheduleExecutionNode = scheduleExecution.getNodes().get(0);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode2.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertFalse(scheduleExecutionResult.isSucceed());

        scheduleExecutionNode = scheduleExecution.getNodes().get(1);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode1.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNull(scheduleExecutionResult);
    }
View Full Code Here

        AutomaticJobExecutionParameters jobExecutionParameters = new AutomaticJobExecutionParameters();
        jobExecutionParameters.setScheduledTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.000 UTC"));
        jobExecutionParameters.setFiredTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.231 UTC"));
        jobExecutionParameters.setNextFireTime(null);

        ScheduleExecution scheduleExecution = scheduleJobExecutorService.executeAutomaticJob(scheduleJob.getId(),
            jobExecutionParameters);
        Assert.assertNotNull(scheduleExecution);

        control.verify();

        ScheduleExecutionNode scheduleExecutionNode;
        ScheduleExecutionResult scheduleExecutionResult;

        scheduleExecution = scheduleExecutionManagementService.findExecution(scheduleExecution.getId());
        Assert.assertEquals(ScheduleExecutionStatus.CANCELED, scheduleExecution.getStatus());
        Assert.assertEquals(2, scheduleExecution.getNodes().size());
        Assert.assertEquals(1, scheduleExecution.getResults().size());

        scheduleExecutionNode = scheduleExecution.getNodes().get(0);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode2.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertFalse(scheduleExecutionResult.isSucceed());

        scheduleExecutionNode = scheduleExecution.getNodes().get(1);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode1.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNull(scheduleExecutionResult);
    }
View Full Code Here

        control.replay();

        ManualJobExecutionParameters jobExecutionParameters = new ManualJobExecutionParameters();
        jobExecutionParameters.setComment("Test comment");

        ScheduleExecution scheduleExecution = scheduleJobExecutorService.executeManualJob(scheduleJob.getId(),
            jobExecutionParameters);
        Assert.assertNotNull(scheduleExecution);

        control.verify();

        ScheduleExecutionNode scheduleExecutionNode;
        ScheduleExecutionResult scheduleExecutionResult;

        scheduleExecution = scheduleExecutionManagementService.findExecution(scheduleExecution.getId());
        Assert.assertEquals(ScheduleExecutionStatus.SUCCEED, scheduleExecution.getStatus());
        Assert.assertEquals("Test comment", scheduleExecution.getDescription());
        Assert.assertEquals(2, scheduleExecution.getNodes().size());
        Assert.assertEquals(1, scheduleExecution.getResults().size());

        scheduleExecutionNode = scheduleExecution.getNodes().get(0);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode2.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertTrue(scheduleExecutionResult.isSucceed());

        scheduleExecutionNode = scheduleExecution.getNodes().get(1);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode1.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNull(scheduleExecutionResult);
    }
View Full Code Here

        ManualJobExecutionParameters jobExecutionParameters = new ManualJobExecutionParameters();
        jobExecutionParameters.setComment("Test comment");
        jobExecutionParameters.setAddresses(Lists.newArrayList("192.168.1.1", "192.168.1.2"));

        ScheduleExecution scheduleExecution = scheduleJobExecutorService.executeManualJob(scheduleJob.getId(),
            jobExecutionParameters);
        Assert.assertNotNull(scheduleExecution);

        control.verify();

        ScheduleExecutionNode scheduleExecutionNode;
        ScheduleExecutionResult scheduleExecutionResult;

        scheduleExecution = scheduleExecutionManagementService.findExecution(scheduleExecution.getId());
        Assert.assertEquals(ScheduleExecutionStatus.SUCCEED, scheduleExecution.getStatus());
        Assert.assertEquals("Test comment", scheduleExecution.getDescription());
        Assert.assertEquals(2, scheduleExecution.getNodes().size());
        Assert.assertEquals(1, scheduleExecution.getResults().size());

        scheduleExecutionNode = scheduleExecution.getNodes().get(0);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals("192.168.1.1", scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertTrue(scheduleExecutionResult.isSucceed());

        scheduleExecutionNode = scheduleExecution.getNodes().get(1);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals("192.168.1.2", scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNull(scheduleExecutionResult);
    }
View Full Code Here

        AutomaticJobExecutionParameters jobExecutionParameters = new AutomaticJobExecutionParameters();
        jobExecutionParameters.setScheduledTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.000 UTC"));
        jobExecutionParameters.setFiredTime(ChronometerUtils.parseMoment("2012-02-20 10:00:00.231 UTC"));
        jobExecutionParameters.setNextFireTime(null);

        ScheduleExecution scheduleExecution = scheduleJobExecutorService.executeAutomaticJob(scheduleJob.getId(),
            jobExecutionParameters);
        Assert.assertNotNull(scheduleExecution);

        control.verify();

        ScheduleExecutionNode scheduleExecutionNode;
        ScheduleExecutionResult scheduleExecutionResult;

        scheduleExecution = scheduleExecutionManagementService.findExecution(scheduleExecution.getId());
        Assert.assertEquals(ScheduleExecutionStatus.SUCCEED, scheduleExecution.getStatus());
        Assert.assertEquals(2, scheduleExecution.getNodes().size());
        Assert.assertEquals(2, scheduleExecution.getResults().size());

        scheduleExecutionNode = scheduleExecution.getNodes().get(0);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode2.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertFalse(scheduleExecutionResult.isSucceed());

        scheduleExecutionNode = scheduleExecution.getNodes().get(1);
        Assert.assertNotNull(scheduleExecutionNode);
        Assert.assertEquals(clusterNode1.getAddress(), scheduleExecutionNode.getAddress());
        scheduleExecutionResult = scheduleExecutionNode.getResult();
        Assert.assertNotNull(scheduleExecutionResult);
        Assert.assertTrue(scheduleExecutionResult.isSucceed());
View Full Code Here

TOP

Related Classes of org.qzerver.model.domain.entities.job.ScheduleExecution

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.