Skip to content

test: make org.jbpm.kie.services.test.UserTaskServiceImplAuditNoneTest deterministic - #2491

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

test: make org.jbpm.kie.services.test.UserTaskServiceImplAuditNoneTest deterministic#2491
Jack-LuoHongyi wants to merge 1 commit into
kiegroup:mainfrom
Jack-LuoHongyi:test/deterministic-usertask-audit-none

Conversation

@Jack-LuoHongyi

Copy link
Copy Markdown

Summary

  • Type: deterministic comparison (fixture-order)
  • Scope: test-only; no production changes
  • Module: jbpm-services/jbpm-kie-services
  • Test: org.jbpm.kie.services.test.UserTaskServiceImplAuditNoneTest

Root Cause
DeploymentDescriptorImpl relies on HashMap iteration order when emitting XML. Under NonDex the order changes, so the generated descriptor violates the schema and 30 tests fail in @Before before any assertions run.

Fix
Replace the dynamic descriptor builder with a static XML string that is identical to the original output (audit disabled, JPA persistence, singleton strategy, etc.), ensuring deterministic resources without touching the assertions or scenarios. The descriptor content, test inputs, coverage, and assertions stay exactly the same, only the HashMap-driven randomness is removed, so there is no reduction in scope or standard.

Validation

  • Local unit test: stable pass
  • NonDex (100 runs): all green

Risk
Low. Only the test fixture changes; it keeps the descriptor content intact while eliminating non-deterministic ordering.

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