You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root Cause DeploymentDescriptorImpl.toXml() relies on Set iteration order. NonDex shuffles that order and the generated XML violates the schema (required-roles and listener elements out of place), causing all 19 tests to fail in @Before with marshal errors.
Fix
Generate the deployment descriptor via an explicit XML string method to ensure the required role is always present in a stable order. This mirrors exactly what the builder produces when iteration happens to be ordered, so the checks still cover the same behavior—no assertions removed, no paths skipped. By eliminating the random serialization order we preserve the full test coverage while making the fixture deterministic.
Validation
Local unit test continues to pass consistently.
NonDex runs succeed across multiple executions(100 runs).
Impact is limited strictly to the test fixture.
Risk
Low. Stabilizing XML output removes order randomness without reducing assertions or test scope.
@Jack-LuoHongyi
Which is the set that shuffles the context of he DeploymentDescriptor?. I feel this PR and all related ones that you opened for several test cases should be fixed by changing toXml method to maintain insertion order rather than expanding the XML on each test.
@fjtirado I’ve drafted an initial solution that applies the ordering fix inside our own DeploymentDescriptorIO#toXml() method. This keeps the descriptor XML schema-compliant no matter the iteration order. The only issue is that the original implementation is part of org.kie:kie-internal, which we use as an external dependency, so I can’t change it directly in this repository. I’m testing the in-repo override (including NonDex) to ensure it doesn’t cause any regressions. If all the checks pass, I’ll share the final patch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jbpm-services/jbpm-kie-servicesorg.jbpm.kie.services.test.RuntimeDataServiceImplSecurityTestRoot Cause
DeploymentDescriptorImpl.toXml()relies onSetiteration order. NonDex shuffles that order and the generated XML violates the schema (required-roles and listener elements out of place), causing all 19 tests to fail in@Beforewith marshal errors.Fix
Generate the deployment descriptor via an explicit XML string method to ensure the required role is always present in a stable order. This mirrors exactly what the builder produces when iteration happens to be ordered, so the checks still cover the same behavior—no assertions removed, no paths skipped. By eliminating the random serialization order we preserve the full test coverage while making the fixture deterministic.
Validation
Risk
Low. Stabilizing XML output removes order randomness without reducing assertions or test scope.