hwu2024 opened a new issue, #2180:
URL: https://github.com/apache/incubator-kie-issues/issues/2180
## Summary
**Modules:**
`optaplanner-quarkus-integration/optaplanner-quarkus-jackson/integration-test`
### Steps to Reproduce
```bash
mvn -DskipTests -DskipITs clean install
mvn -pl
optaplanner-quarkus-integration/optaplanner-quarkus-jackson/integration-test \
edu.illinois:nondex-maven-plugin:2.2.1:nondex \
-Dtest=org.optaplanner.quarkus.jackson.it.OptaPlannerTestResourceTest#solveWithSolverFactory
```
The test fails with:
```
Expected: is
"{\"valueList\":[\"v1\",\"v2\"],\"entityList\":[{\"value\":\"v1\"},{\"value\":\"v2\"}],\"score\":\"0\"}"
Actual:
{"score":"0","entityList":[{"value":"v1"},{"value":"v2"}],"valueList":["v1","v2"]}
```
### Expected behavior
The test should validate the data, not the JSON field order, and therefore
should pass regardless of how Jackson orders object fields.
### Proposed Fix
Update `OptaPlannerTestResourceTest.solveWithSolverFactory()` to assert on
JSON fields using JSONPath instead of raw string equality.
This makes the test safe while still asserting the full structure and
values.
I am currently working on the fix and will later provide a PR related to
this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]