Skip to content

test(client): stop using the deprecated DoclingServeApi.toBuilder() - #716

Merged
edeandrea merged 1 commit into
docling-project:mainfrom
edeandrea:test/stop-using-deprecated-api-tobuilder
Sep 30, 2026
Merged

edeandrea merged 1 commit into
docling-project:mainfrom
edeandrea:test/stop-using-deprecated-api-tobuilder

Conversation

@edeandrea

Copy link
Copy Markdown
Contributor

Summary

DoclingServeApi.toBuilder() is deprecated for removal in favor of config().toBuilder(). This removes the last usages of it, which were all in the docling-serve-client tests.

  • DoclingServeJackson2ClientTests, DoclingServeJackson3ClientTests and AbstractDoclingServeClientAsyncExecutorTests copy the API through config().toBuilder().
  • AbstractDoclingServeClientConfigTests tests the toBuilder() copy constructor of the clients, which config().toBuilder() does not exercise (it goes through the provider and only keeps the options of DoclingServeApiConfig). Each DoclingServeJackson{2,3}ClientConfigTests now implements a copyOf hook that calls toBuilder() on the concrete client type, which isn't deprecated. This also drops the @SuppressWarnings("removal") from those tests.

The toBuilder() declaration and its implementations are untouched, since removing them is a breaking change tracked in #697.

Part of #697

Copy APIs through config().toBuilder() in the client tests, and call toBuilder() on the concrete client type in the tests of the copy constructor, so no test depends on the deprecated method anymore.

Part of docling-project#697

Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com>
@edeandrea edeandrea added the module:docling-serve-client The docling-serve-client module label Sep 30, 2026
@edeandrea
edeandrea enabled auto-merge (squash) September 30, 2026 15:39
@github-actions

Copy link
Copy Markdown

:java_duke: JaCoCo coverage report

Overall Project 49.56% 🔴

There is no coverage information present for the Files changed

@github-actions

Copy link
Copy Markdown
TestsPassed ✅SkippedFailed
Gradle Test Results (all modules & JDKs)2188 ran2188 passed0 skipped0 failed
TestResult
No test annotations available

@github-actions

Copy link
Copy Markdown

HTML test reports are available as workflow artifacts (zipped HTML).

• Download: Artifacts for this run

@edeandrea
edeandrea merged commit 621bbab into docling-project:main Sep 30, 2026
29 checks passed
@edeandrea
edeandrea deleted the test/stop-using-deprecated-api-tobuilder branch September 30, 2026 17:03
@docling-java-ops docling-java-ops Bot added the released Issue has been released label Oct 5, 2026
@docling-java-ops

Copy link
Copy Markdown
Contributor

🎉 This issue has been resolved in v0.7.0 (Release Notes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:docling-serve-client The docling-serve-client module released Issue has been released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant