Package org.qzerver.model.service.job.management.dto

Examples of org.qzerver.model.service.job.management.dto.ScheduleJobCreateParameters


        Assert.assertNull(scheduleExecutionResult);
    }

    @Test
    public void testLimitedAutomaticSingleExecution() throws Exception {
        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone("UTC");
        jobParameters.setCron("0 0 0 * * ?");
        jobParameters.setEnabled(true);
        jobParameters.setAllNodes(false);
        jobParameters.setNodesLimit(1);
        jobParameters.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setNotifyOnFailure(true);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        quartzManagementService.disableJob(scheduleJob.getId());

        control.reset();
View Full Code Here


        Assert.assertTrue(scheduleExecutionResult.isSucceed());
    }

    @Test
    public void testOneFailedAutomaticAllExecution() throws Exception {
        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone("UTC");
        jobParameters.setCron("0 0 0 * * ?");
        jobParameters.setEnabled(true);
        jobParameters.setAllNodes(true);
        jobParameters.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setNotifyOnFailure(true);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        quartzManagementService.disableJob(scheduleJob.getId());

        control.reset();
View Full Code Here

        Assert.assertTrue(scheduleExecutionResult.isSucceed());
    }

    @Test
    public void testAllFailedAutomaticAllExecution() throws Exception {
        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone("UTC");
        jobParameters.setCron("0 0 0 * * ?");
        jobParameters.setEnabled(true);
        jobParameters.setAllNodes(true);
        jobParameters.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setNotifyOnFailure(true);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        quartzManagementService.disableJob(scheduleJob.getId());

        control.reset();
View Full Code Here

    public void testExceptionAutomaticAllExecution() throws Exception {
        ScheduleJobActionParameters actionParameters = new ScheduleJobActionParameters();
        actionParameters.setIdentifier("action.type");
        actionParameters.setDefinition("action.data".getBytes());

        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone("UTC");
        jobParameters.setCron("0 0 0 * * ?");
        jobParameters.setEnabled(true);
        jobParameters.setAllNodes(true);
        jobParameters.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setNotifyOnFailure(true);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        quartzManagementService.disableJob(scheduleJob.getId());

        control.reset();
View Full Code Here

        Assert.assertNull(scheduleExecutionResult);
    }

    @Test
    public void testFailedTimeoutAutomaticAllExecution() throws Exception {
        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone("UTC");
        jobParameters.setCron("0 0 0 * * ?");
        jobParameters.setEnabled(true);
        jobParameters.setTimeout(1000);
        jobParameters.setAllNodes(true);
        jobParameters.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setNotifyOnFailure(true);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        quartzManagementService.disableJob(scheduleJob.getId());

        IAnswer<ActionAgentResult> actionAgentAnswer = new IAnswer<ActionAgentResult>() {
View Full Code Here

        Assert.assertNull(scheduleExecutionResult);
    }

    @Test
    public void testCancelledTimeoutAutomaticAllExecution() throws Exception {
        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone("UTC");
        jobParameters.setCron("0 0 0 * * ?");
        jobParameters.setEnabled(true);
        jobParameters.setTimeout(1000);
        jobParameters.setAllNodes(true);
        jobParameters.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setNotifyOnFailure(true);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        quartzManagementService.disableJob(scheduleJob.getId());

        final Capture<Long> scheduleExecutionCapture = new Capture<Long>();
View Full Code Here

        clusterNode3 = clusterManagementService.createNode(clusterGroup.getId(), "10.2.0.3", "Node 3", false);
    }

    @Test
    public void testNormalAutomaticAllExecution() throws Exception {
        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone("UTC");
        jobParameters.setCron("0 0 0 * * ?");
        jobParameters.setEnabled(true);
        jobParameters.setAllNodes(true);
        jobParameters.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setNotifyOnFailure(true);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        quartzManagementService.disableJob(scheduleJob.getId());

        control.reset();
View Full Code Here

        Assert.assertTrue(scheduleExecutionResult.isSucceed());
    }

    @Test
    public void testLimitedAutomaticAllExecution() throws Exception {
        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone("UTC");
        jobParameters.setCron("0 0 0 * * ?");
        jobParameters.setEnabled(true);
        jobParameters.setAllNodes(true);
        jobParameters.setNodesLimit(1);
        jobParameters.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setNotifyOnFailure(true);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        quartzManagementService.disableJob(scheduleJob.getId());

        control.reset();
View Full Code Here

        clusterNode3 = clusterManagementService.createNode(clusterGroup.getId(), "10.2.0.3", "Node 3", false);
    }

    @Test
    public void testNormalAutomaticAllExecution() throws Exception {
        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone("UTC");
        jobParameters.setCron("0 0 0 * * ?");
        jobParameters.setEnabled(true);
        jobParameters.setAllNodes(true);
        jobParameters.setAllNodesPool(2);
        jobParameters.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setNotifyOnFailure(true);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        quartzManagementService.disableJob(scheduleJob.getId());

        control.reset();
View Full Code Here

        Assert.assertTrue(scheduleExecutionResult.isSucceed());
    }

    @Test
    public void testLimitedAutomaticAllExecution() throws Exception {
        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone("UTC");
        jobParameters.setCron("0 0 0 * * ?");
        jobParameters.setEnabled(true);
        jobParameters.setAllNodes(true);
        jobParameters.setAllNodesPool(2);
        jobParameters.setNodesLimit(1);
        jobParameters.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setNotifyOnFailure(true);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        quartzManagementService.disableJob(scheduleJob.getId());

        control.reset();
View Full Code Here

TOP

Related Classes of org.qzerver.model.service.job.management.dto.ScheduleJobCreateParameters

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.