예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldCreateSuspendedSeedJob()
        public virtual void shouldCreateSuspendedSeedJob()
        {
            // given
            Batch batch = helper.migrateProcessInstancesAsync(2);

            managementService.suspendBatchById(batch.Id);

            // when
            helper.executeSeedJob(batch);

            // then
            Job seedJob = helper.getSeedJob(batch);

            assertTrue(seedJob.Suspended);
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void monitorJobShouldHaveDefaultPriority()
        public virtual void monitorJobShouldHaveDefaultPriority()
        {
            // given
            Batch batch = helper.migrateProcessInstancesAsync(1);

            // when
            helper.executeSeedJob(batch);

            // then
            Job monitorJob = helper.getMonitorJob(batch);

            assertEquals(DefaultJobPriorityProvider.DEFAULT_PRIORITY, monitorJob.Priority);
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void canMigrateInstanceBetweenSameTenantCase1()
        public virtual void canMigrateInstanceBetweenSameTenantCase1()
        {
            // given
            ProcessDefinition sourceDefinition = defaultTestRule.deployForTenantAndGetDefinition(TENANT_ONE, ProcessModels.ONE_TASK_PROCESS);
            ProcessDefinition targetDefinition = defaultTestRule.deployForTenantAndGetDefinition(TENANT_ONE, ProcessModels.ONE_TASK_PROCESS);

            ProcessInstance processInstance = defaultEngineRule.RuntimeService.startProcessInstanceById(sourceDefinition.Id);
            MigrationPlan   migrationPlan   = defaultEngineRule.RuntimeService.createMigrationPlan(sourceDefinition.Id, targetDefinition.Id).mapEqualActivities().build();

            Batch batch = defaultEngineRule.RuntimeService.newMigration(migrationPlan).processInstanceIds(Arrays.asList(processInstance.Id)).executeAsync();

            batchHelper.executeSeedJob(batch);

            // when
            batchHelper.executeJobs(batch);

            // then
            assertMigratedTo(processInstance, targetDefinition);
        }