Hi, I’ve been creating automated process using CPT for Camunda 8.9 with so far next to no issues but now am having some. For context of the local setup is:
- Local c8run (8.9.1) when running the tests locally
- Real workers and stubbing the services rather than mocking the job workers entirely
I’m now noticing that tests in two of my test files are seemingly randomly failing
-
I thought potentially it may be some race conditions / async behaviour that causes them to sometimes pass and sometimes fail (which may still be the case)
-
But from some of the common failures and logs it seems like a lot of the issues may stem from test data not being deleted properly between tests e.g., a mocked service in one test returning the result that would apply in another test
-
2026-05-28T11:56:49.210+01:00 WARN 23436 --- [challenges-service] [ main] .t.a.CamundaProcessTestExecutionListener : Failed to delete the runtime data, skipping. Check the runtime for details. Note that a dirty runtime may cause failures in other test cases. -
This is usually accompanied by:
-
java.lang.RuntimeException: Request failed. [code: 409, message: {"message":"Cannot apply configuration change. Another configuration change [ClusterConfiguration[version=2344, members={0=MemberState[version=4687, lastUpdated=2026-05-28T10:56:48.920052300Z, state=ACTIVE, partitions={1=PartitionState[state=BOOTSTRAPPING, priority=1, config=DynamicPartitionConfig[exporting=ExportingConfig[state=EXPORTING, exporters={rdbms=ExporterState[metadataVersion=0, state=ENABLED, initializedFrom=Optional.empty]}]]]}]}, lastChange=Optional[CompletedChange[id=2342, status=COMPLETED, startedAt=2026-05-28T10:56:45.596377600Z, completedAt=2026-05-28T10:56:46.565395400Z]], pendingChanges=Optional[ClusterChangePlan[id=2344, version=4, status=IN_PROGRESS, startedAt=2026-05-28T10:56:48.791721600Z, completedOperations=[CompletedOperation[operation=PartitionLeaveOperation[memberId=0, partitionId=1, minimumAllowedReplicas=0], completedAt=2026-05-28T10:56:48.905350100Z], CompletedOperation[operation=DeleteHistoryOperation[memberId=0], completedAt=2026-05-28T10:56:48.913147200Z], CompletedOperation[operation=UpdateIncarnationNumberOperation[memberId=0], completedAt=2026-05-28T10:56:48.916651700Z]], pendingOperations=[PartitionBootstrapOperation[memberId=0, partitionId=1, priority=1, config=Optional[DynamicPartitionConfig[exporting=ExportingConfig[state=EXPORTING, exporters={rdbms=ExporterState[metadataVersion=0, state=ENABLED, initializedFrom=Optional.empty]}]]], initializeFromSnapshot=false]]]], routingState=Optional[RoutingState[version=1, requestHandling=AllPartitions[partitionCount=1], messageCorrelation=HashMod[partitionCount=1]]], clusterId=Optional[70f54761-1645-45d4-a271-2b3e162be349], incarnationNumber=1172]] is in progress."}]
My questions are:
- Is there a way to ensure the cleanup retries the data cleanup until successful? I.e., that the cleanup isn’t skipped just because it failed - I’m unsure why this would be an option (or at least the default option) considering the likelihood of cascading test failures due to failed cleanup
- Is there a checklist of test aspects to ensure (as much as possible) that the data cleanup will be successful?
- E.g., ensuring the test is not ending on a job, ensuring process instance is completed / cancelled, etc.
- E.g., some other config unrelated to process instance state?
- Is this potentially just a limitation of local c8run and isn’t a realistic problem when considering automated testing as part of CI/CD?