Repository navigation
test(client): run the shared suite against the client under test - #796
Merged
edeandrea merged 1 commit intoNov 12, 2026
Merged
Conversation
DoclingServeApiConfig.toBuilder() goes through the provider, which prefers Jackson 3 when it is on the classpath. The Jackson 2 suite derived its auth and WireMock clients from it, so every test using them ran against the Jackson 3 client instead. Build every client from a DoclingServeApiConfig with the concrete builder's config(...), and guard that all clients of a suite are the implementation under test. Co-authored-by: Copilot <[email protected]> Signed-off-by: Eric Deandrea <[email protected]>
edeandrea
force-pushed
the
fix/tests-use-client-under-test
branch
from
November 12, 2026 15:39
e70867e to
bb79405
Compare
edeandrea
enabled auto-merge (squash)
November 12, 2026 15:39
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the implementation-specific client setup and regression-test changes.
No open issues 🎉
What changed in this PR
Ensures the shared client tests exercise the intended Jackson implementation, preventing Jackson 2 authentication and WireMock tests from silently using Jackson 3 through provider discovery.
Changes:
- Builds each suite’s clients through implementation-specific helpers using
DoclingServeApiConfig. - Adds a shared regression test verifying that authentication and WireMock clients match the main client’s concrete class.
| File | Description |
|---|---|
docling-serve/docling-serve-client/src/test/java/ai/docling/serve/client/DoclingServeJackson3ClientTests.java |
Explicitly constructs Jackson 3 clients for all setup variants. |
docling-serve/docling-serve-client/src/test/java/ai/docling/serve/client/DoclingServeJackson2ClientTests.java |
Explicitly constructs Jackson 2 clients, bypassing provider selection. |
docling-serve/docling-serve-client/src/test/java/ai/docling/serve/client/AbstractDoclingServeClientTests.java |
Adds assertions guarding against mismatched client implementations. |
Review effort: Balanced
:java_duke: JaCoCo coverage report
|
|
||||||||||||||
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DoclingServeJackson2ClientTestsandDoclingServeJackson3ClientTestsbuilt their auth and WireMock clients withdoclingClient.config().toBuilder()...build().DoclingServeApiConfig.toBuilder()returns the SPIDoclingServeApiBuilder, which goes throughDoclingServeClientProvider, and that prefers Jackson 3 whenever it is on the classpath. So in the Jackson 2 suite, every test usinggetDoclingClient()(which defaults to the auth client) orgetDoclingClient(false, true)was actually exercisingDoclingServeJackson3Client.Found while reviewing #785.
Change
newClient(DoclingServeApiConfig)helper that callsDoclingServeJacksonNClient.builder().config(config).build(). The configs come fromDoclingServeApi.builder()/config().toBuilder(), so nothing goes through the deprecatedDoclingApiBuilderdefault methods.AbstractDoclingServeClientTests#everyClientIsTheImplementationUnderTestasserts that the auth and WireMock clients are exactly the same class as the main client. It fails onmainfor the Jackson 2 suite (Expecting actual: DoclingServeJackson3Client ... to be exactly an instance of DoclingServeJackson2Client).Tests
./gradlew :docling-serve-client:testpasses locally (241 tests), so the Jackson 2 client does pass the full shared suite.Not in this PR
DoclingServeClientBuilderhas no non-deprecatedbaseUrl(String),logRequests(),logResponses()orprettyPrint(): they only exist as default methods of the deprecatedDoclingApiBuilder. ThegetDoclingClientWith…Deserializer()helpers still use them and will break when that interface is removed.