Skip to content

MLE-28583 ML12 test fixes#1940

Merged
jonmille merged 2 commits into
developfrom
MLE-28583-ML12-TestFixes
May 21, 2026
Merged

MLE-28583 ML12 test fixes#1940
jonmille merged 2 commits into
developfrom
MLE-28583-ML12-TestFixes

Conversation

@jonmille
Copy link
Copy Markdown

xdmp.uriContentType and xdmp.uriFormat are no longer available in 12, the tests should only be run in 11 or lower.
Fixed how we get the user in marklogic-client-api/src/test/java/com/marklogic/client/test/rows/UpdateUseCasesTest.java as xdmp.getCurrentUser is no longer available.

jonmille added 2 commits May 19, 2026 14:17
Ignore tests that are no longer supported in ML12.
Getting the user a different way since xdmp calls have been restricted.
@jonmille jonmille requested a review from BillFarber as a code owner May 20, 2026 19:16
Copilot AI review requested due to automatic review settings May 20, 2026 19:16
@jonmille jonmille requested review from rjrudin and stevebio as code owners May 20, 2026 19:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Java client API test suite to account for MarkLogic 12 behavior changes—specifically, functions removed in ML12 (xdmp.uriContentType, xdmp.uriFormat, xdmp.getCurrentUser)—so that tests either skip appropriately on ML12 or no longer depend on removed server APIs.

Changes:

  • Reworked UpdateUseCasesTest.wrapContentInEnvelope to avoid xdmp.getCurrentUser() by binding the expected username as a plan parameter.
  • Disabled generated Optic tests that call removed xdmp.* functions by gating them with RequiresML11OrLower.
  • Centralized the test username in AbstractOpticUpdateTest via a shared constant.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
marklogic-client-api/src/test/java/com/marklogic/client/test/rows/UpdateUseCasesTest.java Avoids xdmp.getCurrentUser() by binding currentUser as a parameter and asserting against TEST_USER.
marklogic-client-api/src/test/java/com/marklogic/client/test/rows/AbstractOpticUpdateTest.java Introduces TEST_USER constant and reuses it in test client setup.
marklogic-client-api/src/test/java/com/marklogic/client/test/PlanGeneratedTest.java Skips tests that depend on removed ML12 xdmp.* functions using @ExtendWith(RequiresML11OrLower.class).

@jonmille jonmille merged commit fa3b530 into develop May 21, 2026
7 of 8 checks passed
@jonmille jonmille deleted the MLE-28583-ML12-TestFixes branch May 21, 2026 16:02
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.

3 participants