Skip to content

Fix flaky testDlfStSTokenPathAuth#7309

Merged
JingsongLi merged 1 commit intoapache:masterfrom
sundapeng:fix-rest-catalog-unstable-test
Feb 26, 2026
Merged

Fix flaky testDlfStSTokenPathAuth#7309
JingsongLi merged 1 commit intoapache:masterfrom
sundapeng:fix-rest-catalog-unstable-test

Conversation

@sundapeng
Copy link
Member

@sundapeng sundapeng commented Feb 26, 2026

Purpose

Fix flaky testDlfStSTokenPathAuth (and testDlfStSTokenAuth) in MockRESTCatalogTest.

The mock server and the client each called Instant.now() independently to compute the DLF signature. When the two calls straddled a second boundary, the formatted x-dlf-date diverged, causing a signature mismatch and NotAuthorizedException.

Introduce a test-only TestDLFAuthProvider that reuses the sign headers already present in the incoming request instead of generating a fresh timestamp, so the server-side verification always uses the same timestamp as the client.

Tests

  • MockRESTCatalogTest#testDlfStSTokenAuth
  • MockRESTCatalogTest#testDlfStSTokenPathAuth

API and Format

No.

Documentation

No.

Generative AI tooling

No.

@sundapeng sundapeng closed this Feb 26, 2026
@sundapeng sundapeng reopened this Feb 26, 2026
@sundapeng sundapeng closed this Feb 26, 2026
@sundapeng sundapeng reopened this Feb 26, 2026
@sundapeng sundapeng closed this Feb 26, 2026
@sundapeng sundapeng reopened this Feb 26, 2026
@JingsongLi
Copy link
Contributor

+1

@JingsongLi JingsongLi merged commit 2275886 into apache:master Feb 26, 2026
34 of 52 checks passed
@sundapeng sundapeng deleted the fix-rest-catalog-unstable-test branch February 26, 2026 08:57
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