예제 #1
0
        public virtual void monitorJobShouldHaveDefaultPriority()
        {
            // given
            var batch = helper.MigrateProcessInstancesAsync(1);

            // when
            helper.ExecuteSeedJob(batch);

            // then
            var monitorJob = helper.GetMonitorJob(batch);

            Assert.AreEqual(DefaultJobPriorityProvider.DEFAULT_PRIORITY, monitorJob.Priority);
        }
예제 #2
0
        public virtual void shouldSuspendMonitorJobAndDefinition()
        {
            // given
            var batch = helper.MigrateProcessInstancesAsync(1);

            helper.ExecuteSeedJob(batch);

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

            // then
            var monitorJobDefinition = helper.GetMonitorJobDefinition(batch);

            Assert.True(monitorJobDefinition.Suspended);

            var monitorJob = helper.GetMonitorJob(batch);

            Assert.True(monitorJob.Suspended);
        }
예제 #3
0
        [Test]   public virtual void testBatchJobsTenantId()
        {
            // given
            IBatch batch = batchHelper.MigrateProcessInstanceAsync(tenant1Definition, tenant1Definition);

            // then
            IJob seedJob = batchHelper.GetSeedJob(batch);

            Assert.AreEqual(TENANT_ONE, seedJob.TenantId);

            batchHelper.ExecuteSeedJob(batch);

            IList <IJob> migrationJob = batchHelper.GetExecutionJobs(batch);

            Assert.AreEqual(TENANT_ONE, migrationJob[0].TenantId);

            IJob monitorJob = batchHelper.GetMonitorJob(batch);

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