Skip to content

test: make org.jbpm.bpmn2.BPMN2XMLTest.testXML deterministic - #2472

Open
Jack-LuoHongyi wants to merge 1 commit into
kiegroup:mainfrom
Jack-LuoHongyi:test/deterministic-bpmn2xmltest
Open

test: make org.jbpm.bpmn2.BPMN2XMLTest.testXML deterministic#2472
Jack-LuoHongyi wants to merge 1 commit into
kiegroup:mainfrom
Jack-LuoHongyi:test/deterministic-bpmn2xmltest

Conversation

@Jack-LuoHongyi

Copy link
Copy Markdown

Summary

  • Type: deterministic comparison (iteration-order)
  • Scope: test-only; no production changes
  • Module: jbpm-bpmn2
  • Test: org.jbpm.bpmn2.BPMN2XMLTest#testXML

Root Cause
The test fails intermittently due to unordered collections (Set/Map) producing varying XML element order for tns:import, tns:global, sequenceFlow, and bpmndi:BPMNEdge.

Fix
Add these elements to the order-insensitive whitelist in XMLUnit's DifferenceListener. Only child sequence differences are ignored; missing/extra nodes or attribute mismatches still fail.

Validation

  • Local: mvn -pl jbpm-bpmn2 -Dtest=org.jbpm.bpmn2.BPMN2XMLTest#testXML test passes consistently
  • Scope: Test-only changes, no production impact

Risk
Low. Only ignores incidental order differences while preserving content validation.

@Jack-LuoHongyi Jack-LuoHongyi changed the title test: make org.jbpm.bpmn2.BPMN2XMLTest deterministic test: make org.jbpm.bpmn2.BPMN2XMLTest.testXML deterministic Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant