Probably a bug in Camunda 7.17.
When running Camunda 7.17 process test with JUnit 5 it is required to declare @Test method as public:
@SpringBootTest
@Deployment(resources = "test.bpmn")
class Test {
@RegisterExtension ProcessEngineExtension processEngine;
@Test
public void test() {
// size == 1
this.processEngine.getRepositoryService().createProcessDefinitionQuery().list();
}
}
declaring it as package scoped (default JUnit 5 recommendation) leads to @Deployment not to trigger properly:
@SpringBootTest
@Deployment(resources = "test.bpmn")
class Test {
@RegisterExtension ProcessEngineExtension processEngine;
@Test
void test() {
// size == 0
this.processEngine.getRepositoryService().createProcessDefinitionQuery().list();
}
}