use of org.camunda.bpm.engine.impl.cmd.DeleteJobsCmd in project camunda-bpm-platform by camunda.
the class JobQueryTest method tearDown.
@Override
protected void tearDown() throws Exception {
repositoryService.deleteDeployment(deploymentId, true);
commandExecutor.execute(new DeleteJobsCmd(messageId, true));
super.tearDown();
}
use of org.camunda.bpm.engine.impl.cmd.DeleteJobsCmd in project camunda-bpm-platform by camunda.
the class StartTimerEventTest method cleanDB.
private void cleanDB() {
String jobId = managementService.createJobQuery().singleResult().getId();
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
commandExecutor.execute(new DeleteJobsCmd(jobId, true));
}
use of org.camunda.bpm.engine.impl.cmd.DeleteJobsCmd in project camunda-bpm-platform by camunda.
the class DeploymentAwareJobExecutorTest method testJobsWithoutDeploymentIdAreAlwaysProcessed.
public void testJobsWithoutDeploymentIdAreAlwaysProcessed() {
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
String messageId = commandExecutor.execute(new Command<String>() {
public String execute(CommandContext commandContext) {
MessageEntity message = new MessageEntity();
commandContext.getJobManager().send(message);
return message.getId();
}
});
AcquiredJobs acquiredJobs = getExecutableJobs(processEngineConfiguration.getJobExecutor());
Assert.assertEquals(1, acquiredJobs.size());
Assert.assertTrue(acquiredJobs.contains(messageId));
commandExecutor.execute(new DeleteJobsCmd(messageId, true));
}
Aggregations