MLE-31642 fromLexicons Test fix - #1964
Conversation
propertiesFragmentShouldNotBeReturnedByFromLexicons() was failing against ML12.1 due to intended behavior change, validated in MLE-31757. The test has been updated to only run on ML version >12.0. A new test has been added to validate the new ML 12.1 fromLexicons behavior.
There was a problem hiding this comment.
Pull request overview
Updates Optic fromLexicons/joinDoc row tests to accommodate the MarkLogic 12.1 behavior change where fromLexicons enumerates both content and properties fragments, and introduces version-gated coverage for both pre-12.1 and 12.1+ behaviors.
Changes:
- Gate the existing
propertiesFragmentShouldNotBeReturnedByFromLexiconstest to run only on MarkLogic <= 12.0. - Add a new test validating MarkLogic 12.1+ returns twice the number of rows (content + properties fragments) via
fromLexicons+joinDoc. - Add a new JUnit5
ExecutionConditionextension for requiring MarkLogic 12.0 or lower.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| marklogic-client-api/src/test/java/com/marklogic/client/test/rows/JoinDocTest.java | Adds ML-version gating to the existing fromLexicons test and adds a new ML 12.1+ behavior-validation test. |
| marklogic-client-api/src/test/java/com/marklogic/client/test/junit5/RequiresML12Dot0OrLower.java | Introduces a JUnit5 condition for restricting tests to MarkLogic <= 12.0. |
| * 2022-12-12 This is now running only on ML 11, as it's consistently failing on ML 10. We have a fix slated for | ||
| * 11.x, and it's not clear yet if it'll be backported to ML 10. | ||
| */ | ||
| @ExtendWith(RequiresML12Dot0OrLower.class) |
| } | ||
|
|
||
| /** | ||
| * In ML 12.1+, fromLexicons enumerates both content fragments and properties fragments, so joinDoc |
There was a problem hiding this comment.
Is there an internal MLE Jira ticket to tie to this? My first reaction on seeing this was - really?? And wanting to read the explanation for why fromLexicons was altered.
There was a problem hiding this comment.
Here is the regression I filed and Jos and Ling mentioned it was intentional: https://progresssoftware.atlassian.net/browse/MLE-31757
Jos pointed at this ticket: https://progresssoftware.atlassian.net/browse/MLE-27502?xpis=eyJicmlkZ2UiOiJzbWFydExpbmtzIiwiaWQiOiIxNzg1OTU4NDYyMDk3Iiwic291cmNlIjoiamlyYS1KU1cifQ%3D%3D
propertiesFragmentShouldNotBeReturnedByFromLexicons() was failing against ML12.1 due to intended behavior change, validated in MLE-31757. The test has been updated to only run on ML version 12.0 or lower. A new test has been added to validate the new ML 12.1 fromLexicons behavior.
Jira Ticket: https://progresssoftware.atlassian.net/browse/MLE-31642
ML 12.1 behavior change verified in comments of: https://progresssoftware.atlassian.net/browse/MLE-31757