Uh oh!
There was an error while loading. Please reload this page.
MLE-31642 Update noSslContext Test - #1963
Conversation
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()
There was a problem hiding this comment.
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
noSslContextruns 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.
| 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
left a comment
There was a problem hiding this comment.
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.
This reverts commit cf8d656.
- 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
commented
Aug 3, 2026
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 |
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.
Jira Ticket: https://progresssoftware.atlassian.net/browse/MLE-31642