Exemple #1
0
        private string prepareHistoricBatches(int batchesCount)
        {
            DateTime startDate = ClockUtil.CurrentTime;

            ClockUtil.CurrentTime = DateUtils.addDays(startDate, daysInThePast);

            IList <Batch> list = new List <Batch>();

            for (int i = 0; i < batchesCount; i++)
            {
                list.Add(helper.migrateProcessInstancesAsync(1));
            }

            Batch  batch1    = list[0];
            string batchType = batch1.Type;

            helper.executeSeedJob(batch1);
            helper.executeJobs(batch1);
            ClockUtil.CurrentTime = DateUtils.addDays(startDate, batch1EndTime);
            helper.executeMonitorJob(batch1);

            Batch batch2 = list[1];

            helper.executeSeedJob(batch2);
            helper.executeJobs(batch2);
            ClockUtil.CurrentTime = DateUtils.addDays(startDate, batch2EndTime);
            helper.executeMonitorJob(batch2);

            ClockUtil.CurrentTime = DateTime.Now;

            return(batchType);
        }
Exemple #2
0
        private IList <string> createMigrationBatchList(int migrationCountBatch)
        {
            IList <string> batchIds = new List <string>();

            for (int i = 0; i < migrationCountBatch; i++)
            {
                batchIds.Add(migrationHelper.migrateProcessInstancesAsync(1).Id);
            }
            return(batchIds);
        }
Exemple #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testBatchBinary()
        public virtual void testBatchBinary()
        {
            // when
            helper.migrateProcessInstancesAsync(15);

            string byteArrayValueId = ((BatchEntity)managementService.createBatchQuery().singleResult()).Configuration;

            ByteArrayEntity byteArrayEntity = configuration.CommandExecutorTxRequired.execute(new GetByteArrayCommand(byteArrayValueId));

            checkBinary(byteArrayEntity);
        }
Exemple #4
0
        private void prepareHistoricBatches(int batchesCount, int daysInThePast)
        {
            DateTime startDate = ClockUtil.CurrentTime;

            ClockUtil.CurrentTime = DateUtils.addDays(startDate, daysInThePast);

            IList <Batch> list = new List <Batch>();

            for (int i = 0; i < batchesCount; i++)
            {
                list.Add(migrationHelper.migrateProcessInstancesAsync(1));
            }

            foreach (Batch batch in list)
            {
                migrationHelper.executeSeedJob(batch);
                migrationHelper.executeJobs(batch);

                ClockUtil.CurrentTime = DateUtils.setMinutes(DateUtils.addDays(startDate, ++daysInThePast), random.Next(60));
                migrationHelper.executeMonitorJob(batch);
            }

            ClockUtil.CurrentTime = DateTime.Now;
        }
Exemple #5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testQueryOrderByIdAsc()
        public virtual void testQueryOrderByIdAsc()
        {
            // given
            helper.migrateProcessInstancesAsync(1);
            helper.migrateProcessInstancesAsync(1);

            // when
            IList <BatchStatistics> statistics = managementService.createBatchStatisticsQuery().orderById().asc().list();

            // then
            verifySorting(statistics, batchStatisticsById());
        }
Exemple #6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testBatchQuery()
        public virtual void testBatchQuery()
        {
            // given
            Batch batch1 = helper.migrateProcessInstancesAsync(1);
            Batch batch2 = helper.migrateProcessInstancesAsync(1);

            // when
            IList <HistoricBatch> list = historyService.createHistoricBatchQuery().list();

            // then
            assertEquals(2, list.Count);

            IList <string> batchIds = new List <string>();

            foreach (HistoricBatch resultBatch in list)
            {
                batchIds.Add(resultBatch.Id);
            }

            Assert.assertTrue(batchIds.Contains(batch1.Id));
            Assert.assertTrue(batchIds.Contains(batch2.Id));
        }