示例#1
0
        public virtual void executionJobShouldGetPriorityFromOverridingJobDefinitionPriority()
        {
            // given
            var batch = helper.MigrateProcessInstancesAsync(1);
            var executionJobDefinition = helper.GetExecutionJobDefinition(batch);

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

            // when
            helper.ExecuteSeedJob(batch);

            // then
            var executionJob = helper.GetExecutionJobs(batch)[0];

            Assert.AreEqual(CUSTOM_PRIORITY, executionJob.Priority);
        }
示例#2
0
        public virtual void shouldSuspendExecutionJobsAndDefinition()
        {
            // given
            var batch = helper.MigrateProcessInstancesAsync(1);

            helper.ExecuteSeedJob(batch);

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

            // then
            var migrationJobDefinition = helper.GetExecutionJobDefinition(batch);

            Assert.True(migrationJobDefinition.Suspended);

            var migrationJob = helper.GetExecutionJobs(batch)[0];

            Assert.True(migrationJob.Suspended);
        }
示例#3
0
        [Test]   public virtual void testBatchJobDefinitionsTenantId()
        {
            // given
            IBatch batch = batchHelper.MigrateProcessInstanceAsync(tenant1Definition, tenant1Definition);

            // then
            IJobDefinition migrationJobDefinition = batchHelper.GetExecutionJobDefinition(batch);

            Assert.AreEqual(TENANT_ONE, migrationJobDefinition.TenantId);

            IJobDefinition monitorJobDefinition = batchHelper.GetMonitorJobDefinition(batch);

            Assert.AreEqual(TENANT_ONE, monitorJobDefinition.TenantId);

            IJobDefinition seedJobDefinition = batchHelper.GetSeedJobDefinition(batch);

            Assert.AreEqual(TENANT_ONE, seedJobDefinition.TenantId);
        }