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

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


        Assert.assertNull(scheduleExecutionResult);
    }

    @Test
    public void testOneFailedAutomaticSingleExecution() 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.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 testAllFailedAutomaticSingleExecution() 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.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.assertFalse(scheduleExecutionResult.isSucceed());
    }

    @Test
    public void testExceptionAutomaticSingleExecution() 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.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 testNoResultAutomaticSingleExecution() 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.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

        clusterGroup = clusterManagementService.createGroup("Test group");
        clusterNode1 = clusterManagementService.createNode(clusterGroup.getId(), "10.2.0.1", "Node 1", true);
        clusterNode2 = clusterManagementService.createNode(clusterGroup.getId(), "10.2.0.2", "Node 2", true);
        clusterNode3 = clusterManagementService.createNode(clusterGroup.getId(), "10.2.0.3", "Node 3", true);

        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.setClusterGroupId(clusterGroup.getId());
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        scheduleJob = scheduleJobManagementService.createJob(jobParameters);

        // Disable Quartz job manually to prevent the firing from Quartz
        quartzManagementService.disableJob(scheduleJob.getId());
View Full Code Here

        Assert.assertEquals("192.168.1.2", scheduleExecutionNode.getAddress());
    }

    @Test
    public void testLocalhostCreation() 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.setClusterGroupId(null);
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        ScheduleJob localhostScheduleJob = scheduleJobManagementService.createJob(jobParameters);

        StartExecutionParameters startExecutionParameters = new StartExecutionParameters();
        startExecutionParameters.setManual(false);
View Full Code Here

            EasyMock.eq(true)
        );

        control.replay();

        ScheduleJobCreateParameters jobParameters = new ScheduleJobCreateParameters();
        jobParameters.setName("Test Job");
        jobParameters.setDescription("Nothing to do");
        jobParameters.setTimezone(DEFAULT_TIMEZONE);
        jobParameters.setCron(cron);
        jobParameters.setEnabled(true);
        jobParameters.setClusterGroupId(null);
        jobParameters.setScheduleGroupId(scheduleGroup.getId());
        jobParameters.setStrategy(ScheduleExecutionStrategy.CIRCULAR);
        jobParameters.setActionIdentifier("action.type");
        jobParameters.setActionDefinition("action.data".getBytes());

        ScheduleJob scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        Assert.assertNotNull(scheduleJob);

        control.verify();
View Full Code Here

            EasyMock.eq(true)
        );

        control.replay();

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

        ScheduleJob scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        Assert.assertNotNull(scheduleJob);

        control.verify();
View Full Code Here

            EasyMock.capture(idCapture2)
        );

        control.replay();

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

        ScheduleJob scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        Assert.assertNotNull(scheduleJob);

        ScheduleExecution scheduleExecution = new ScheduleExecution();
View Full Code Here

            EasyMock.eq(true)
        );

        control.replay();

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

        ScheduleJob scheduleJob = scheduleJobManagementService.createJob(jobParameters);
        Assert.assertNotNull(scheduleJob);

        ScheduleJobModifyParameters modifyParameters = new ScheduleJobModifyParameters();
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.