Skip to content

MLE-31642 Update noSslContext Test - #1963

Merged
jonmille merged 5 commits into
developfrom
MLE-31642-noSslContext-test-update
Aug 3, 2026
Merged

MLE-31642 Update noSslContext Test#1963
jonmille merged 5 commits into
developfrom
MLE-31642-noSslContext-test-update

Conversation

@jonmille

@jonmille jonmille commented Aug 3, 2026

Copy link
Copy Markdown

MarkLogic 12.1 is now returning a 403 error code, like we expect, instead of closing the connection and throwing a MarkLogicIOException for ML 12.1.

  • Renamed noSslContext() -> noSslContextWithMarkLogic11OrLower()
  • Added RequiresML12Dot0.java to only run tests against 12.0 versions
  • Renamed noSslContextWithMarkLogic12() to noSslContextWithMarkLogic12Dot0()
  • noSslContextWithMarkLogic12Dot0() ExtendWith updated to new RequiresML12Dot0.class to only run against 12.0 versions
  • Added noSslContextWithMarkLogic12Dot1OrHigher() for new ML 12.1 behavior

Jira Ticket: https://progresssoftware.atlassian.net/browse/MLE-31642

MarkLogic 12.1 is now returning a 403 error code, like we expect, instead of closing the connection and throwing a MarkLogicIOException.
- Removed @ExtendsWith(RequiresMLS11OrLower.class) annotation to run against ML12.1
- Updated comments to explain failure history if run against a MLS 12.0.x build
- Removed noSslContextWithMarkLogic12()

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the one-way SSL JUnit test suite in marklogic-client-api to reflect MarkLogic 12.1’s restored behavior when an HTTP client connects to an HTTPS-required app server.

Changes:

  • Removes the ML11-or-lower gating so noSslContext runs against ML12.1+.
  • Replaces/expands in-test commentary to document the ML12.0.x “unexpected end of stream” behavior (MLE-17505) and its reversal in 12.1.
  • Removes the dedicated MarkLogic 12-only variant test that expected an IO exception.

Comment on lines +136 to +140
DatabaseClient.ConnectionResult result = client.checkConnection();
assertEquals("Forbidden", result.getErrorMessage(), "MarkLogic is expected to return a 403 Forbidden when the " +
"user tries to access an HTTPS app server using HTTP. This behavior changes in MarkLogic 12, and it may " +
"be considered a bit surprising with MarkLogic 11 and earlier - that is, the user probably shouldn't get " +
"any response back since a connection cannot be made without using SSL.");
"user tries to access an HTTPS app server using HTTP. If this assertion fails with a MarkLogicIOException " +
"containing 'unexpected end of stream', the test is likely running against a pre-12.1 MarkLogic 12 build " +
"that exhibited the now-reverted MLE-17505 behaviour.");

@rjrudin rjrudin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is definitely a good change by the server, but I think we need to keep a "RequiresML11OrLower" test that verifies that an IO exception is expected instead. While that's not desirable behavior, it's important to document that in one of our tests.

- Updated noSslContext() to noSslContextWithMarkLogic11OrLower()
- Added RequiresML12Dot0 to test ML 12.0.x versions
- Updated noSslContextWithMarkLogic12() to extend with RequiresML12Dot0.class for only ML versions 12.0.x
- Added noSslContextWithMarkLogic12Dot1OrHigher() for ML 12.1 and up behavior.
noSslContextWithMarkLogic11OrLower() -> noSslContext() and updated the ExtendsWith annotation to @ExtendWith({RequiresML11OrLower.class, RequiresML12Dot1.class})
This reverts commit f070abe.
@jonmille

jonmille commented Aug 3, 2026

Copy link
Copy Markdown
Author

This is definitely a good change by the server, but I think we need to keep a "RequiresML11OrLower" test that verifies that an IO exception is expected instead. While that's not desirable behavior, it's important to document that in one of our tests.

It IO exception was occurring for ML 12.0.x versions. The tests now cover the behaviors for 11 and lower, 12.0.x, and 12.1 and greater

@jonmille
jonmille requested a review from rjrudin August 3, 2026 17:12
@jonmille
jonmille merged commit b8484e1 into develop Aug 3, 2026
3 of 4 checks passed
@jonmille
jonmille deleted the MLE-31642-noSslContext-test-update branch August 4, 2026 14:27
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.

4 participants