示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void executionJobShouldGetPriorityFromOverridingJobDefinitionPriority()
        public virtual void executionJobShouldGetPriorityFromOverridingJobDefinitionPriority()
        {
            // given
            Batch         batch = helper.migrateProcessInstancesAsync(1);
            JobDefinition executionJobDefinition = helper.getExecutionJobDefinition(batch);

            managementService.setOverridingJobPriorityForJobDefinition(executionJobDefinition.Id, CUSTOM_PRIORITY, true);

            // when
            helper.executeSeedJob(batch);

            // then
            Job executionJob = helper.getExecutionJobs(batch)[0];

            assertEquals(CUSTOM_PRIORITY, executionJob.Priority);
        }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldSuspendExecutionJobsAndDefinition()
        public virtual void shouldSuspendExecutionJobsAndDefinition()
        {
            // given
            Batch batch = helper.migrateProcessInstancesAsync(1);

            helper.executeSeedJob(batch);

            // when
            managementService.suspendBatchById(batch.Id);

            // then
            JobDefinition migrationJobDefinition = helper.getExecutionJobDefinition(batch);

            assertTrue(migrationJobDefinition.Suspended);

            Job migrationJob = helper.getExecutionJobs(batch)[0];

            assertTrue(migrationJob.Suspended);
        }