157158159160161162163
} private void cleanDB() { String jobId = managementService.createJobQuery().singleResult().getId(); CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired(); commandExecutor.execute(new DeleteJobsCmd(jobId)); }
107108109110111112113114
} @Override protected void tearDown() throws Exception { repositoryService.deleteDeployment(deploymentId, true); commandExecutor.execute(new DeleteJobsCmd(messageId)); super.tearDown(); }
55565758596061
waitForJobExecutorToProcessAllJobs(15000L, 50L); // TODO check if there is a failed job in the DLQ commandExecutor.execute(new DeleteJobsCmd(jobId)); }
211212213214215216217218
.getCommandContext() .getJobManager() .findJobsByConfiguration(TimerStartEventJobHandler.TYPE, processDefinition.getKey()); for (Job job :jobsToDelete) { new DeleteJobsCmd(job.getId()).execute(Context.getCommandContext()); } }
1130113111321133113411351136
117118119120121122123124
303304305306307308309310
158159160161162163164
AcquiredJobs acquiredJobs = getExecutableJobs(processEngineConfiguration.getJobExecutor()); Assert.assertEquals(1, acquiredJobs.size()); Assert.assertTrue(acquiredJobs.contains(messageId)); commandExecutor.execute(new DeleteJobsCmd(messageId)); }