cleaner.cleanRepository();
} catch (Exception e) {
fail(e.getMessage());
}
WorkflowInstanceRepository repo = new LuceneWorkflowInstanceRepository(
instRepoPath, 20);
try {
assertEquals(10, repo.getNumWorkflowInstances());
for (WorkflowInstance inst : (List<WorkflowInstance>) repo
.getWorkflowInstances()) {
if (!inst.getStatus().equals(WorkflowStatus.FINISHED)) {
fail("Workflow Instance: [" + inst.getId()
+ "] does was not marked as finished by the cleaner: status: ["
+ inst.getStatus() + "]");