Beispiel #1
0
        public virtual void seedJobShouldHaveDefaultPriority()
        {
            // when
            var batch = helper.MigrateProcessInstancesAsync(1);

            // then
            var seedJob = helper.GetSeedJob(batch);

            Assert.AreEqual(DefaultJobPriorityProvider.DEFAULT_PRIORITY, seedJob.Priority);
        }
Beispiel #2
0
        public virtual void shouldSuspendSeedJobAndDefinition()
        {
            // given
            var batch = helper.MigrateProcessInstancesAsync(1);

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

            // then
            var seedJobDefinition = helper.GetSeedJobDefinition(batch);

            Assert.True(seedJobDefinition.Suspended);

            var seedJob = helper.GetSeedJob(batch);

            Assert.True(seedJob.Suspended);
        }
Beispiel #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);
        }
        public virtual void testStatisticsMostExecutionJobsGenerated()
        {
            // given
            var batch = helper.CreateMigrationBatchWithSize(13);

            // when
            helper.ExecuteJob(helper.GetSeedJob(batch));

            // then
            var batchStatistics = managementService.CreateBatchStatisticsQuery()
                                  .First();

            Assert.AreEqual(13, batchStatistics.TotalJobs);
            Assert.AreEqual(10, batchStatistics.JobsCreated);
            Assert.AreEqual(13, batchStatistics.RemainingJobs);
            Assert.AreEqual(0, batchStatistics.CompletedJobs);
            Assert.AreEqual(0, batchStatistics.FailedJobs);
        }