Skip to content

Oak 12219 test2#2989

Open
reschke wants to merge 8 commits into
trunkfrom
OAK-12219-test2
Open

Oak 12219 test2#2989
reschke wants to merge 8 commits into
trunkfrom
OAK-12219-test2

Conversation

@reschke

@reschke reschke commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

No description provided.

seropian and others added 5 commits June 30, 2026 10:55
- pin jackson version to the one in AEM to prevent transitive dep download.

Ai-Assisted-By: claude
@github-actions

Copy link
Copy Markdown

Commit-Check ✔️

seropian and others added 3 commits June 30, 2026 20:14
AzureBlobStoreBackendV12:
- RuntimeException -> IllegalStateException in getMetadataRecord/getAllMetadataRecords/deleteAllMetadataRecords
- chain DataStoreException (not unwrapped IOException cause) in write() catch block
- .collect(Collectors.toList()) -> .toList() in commitBlocksAndGetSize
- instanceof pattern matching for BlobStorageException in completeHttpUpload
- nested ternary -> if-else for operation string in presigned URI error log
- return new byte[0] instead of null in readMetadataBytes; update caller check

RegressionCSOV8Test:
- swap assertEquals args to (actual, expected) order per Sonar S3415

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Ai-Assisted-By: claude-code
PR #2989 failed the quality gate at 67.9% coverage on new code (need 80%).
The Azure ITs that cover blob CRUD don't run in CI, so the new V12 classes
were largely uncovered. Add mock-based unit tests (Mockito mocks the Azure
BlobContainerClient/BlockBlobClient chain) so the SDK-call paths are covered
without a live Azurite endpoint.

New/expanded tests:
- AzureBlobStoreBackendV12MockTest (new): read/getRecord/exists/deleteRecord
  success + 404 + storage-error paths; metadata get/exists/delete; init()
  config parsing (concurrent-request clamping, secondary location, presigned
  URI config); getAllIdentifiers/getAllRecords meta+no-dash filtering;
  getAllMetadataRecords success; write exists/missing/length-collision;
  addMetadataRecord(File); initiateHttpUpload arg validation; data record getters
- AzureHttpRequestLoggingPolicyV12Test (new): verbose on/off process() paths
- AzureDataStoreWrapperTest: createDataStore v8/v12, getDescription, init
  delegation, 3-arg upload, statistics provider getter/setter
- AzureBlobContainerProviderV12Test: service-principal credential branch,
  getEndpointUrl variants

Blended new-code coverage (line+branch) on the new files now ~82% locally.

Also make getOrCreateReferenceKey tolerate a null from a readMetadataBytes
override (production returns empty array; test subclasses may return null).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Ai-Assisted-By: claude
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

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.

2 participants