test(version-tests): add tests for client, domain, and service layers#570
Open
margi212 wants to merge 2 commits into
Open
test(version-tests): add tests for client, domain, and service layers#570margi212 wants to merge 2 commits into
margi212 wants to merge 2 commits into
Conversation
…ervice layers - Add RegistryClientFactoryTests: GHCR client resolution, unsupported/null/empty/whitespace/case-sensitive registry, instance reuse - Add GHCRClientLoggerTests: request/response logging toggle, token/header masking, null/empty/non-JSON body, redirect response - Add TagsTestRequestTests: builder construction, toBuilder(), field setters, null/empty edge cases, executor null validation - Add NamedThreadFactoryTests: named thread creation, counter increment, separate factory counters, runnable execution, concurrent creation - Add WorkParallelizerTests: parallel transform/run, empty/single/large lists, multi-type transformation, concurrent execution - Extend TagTestResultTests: TagsTestResults sorting, from() factory, toBuilder(), setResults()/clearResults(), failure detection Signed-off-by: Margi <39212098+margi212@users.noreply.github.com>
client, domain, and service layers of the docling-version-tests module.docling-version-tests module.
docling-version-tests module.
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.
Summary
Adds comprehensive unit test coverage across the
client,domain, andservicelayers of thedocling-version-testsmodule.Changes
New Test Classes
RegistryClientFactoryTestsRegistryClientFactoryGHCRClientLoggerTestsGHCRClientLoggerTagsTestRequestTestsTagsTestRequestNamedThreadFactoryTestsNamedThreadFactoryWorkParallelizerTestsWorkParallelizerExtended Test Classes
TagTestResultTestsTagsTestResultssorting,from()factory,toBuilder(),setResults()/clearResults(), failure detection, and nested/long stack trace handlingCoverage Highlights
RegistryClientFactory— validates correct client dispatch forghcr.io, plus rejection of unsupported, null, empty, whitespace-padded, and case-mismatched registry strings; verifies client instance reuse.GHCRClientLogger— validates conditional request/response logging, masking oftokenfields in JSON bodies,AuthorizationandSet-Cookieheader redaction, and graceful handling of null, empty, non-JSON, and JSON-array bodies.TagsTestRequest— validates builder construction,toBuilder()round-trip fidelity, method chaining, override behavior, and mandatoryexecutorfield enforcement.NamedThreadFactory— validates thread naming with incrementing suffix, isolated counters per factory instance, and thread-safe concurrent creation.WorkParallelizer— validates paralleltransformandrunsemantics across empty, single, multi-item, and large (100-item) workloads with type-safe generic transformation.TagTestResult/TagsTestResults— extends existing tests with version-sorted result sets, factory construction from aTagsTestRequest, mutable builder operations, and failure presence detection.Test Design Notes
assertThat(AssertJ).CountDownLatch/AtomicIntegerto avoid race conditions in assertions.