Skip to content

test(vault): fix the default JWT exp once so equal tokens compare equal (flaky CI) - #526

Merged
MCERQUA merged 3 commits into
mainfrom
fix/flaky-vault-jwt-exp
Oct 4, 2026
Merged

MCERQUA merged 3 commits into
mainfrom
fix/flaky-vault-jwt-exp

Conversation

@MCERQUA

@MCERQUA MCERQUA commented Oct 4, 2026

Copy link
Copy Markdown
Owner

The jwt() test helper in tests/test_vault_connectors.py took exp from time.time() on every call. Tests that compare a stored credential against an expected one built a moment later failed whenever a clock second ticked between the two calls. It flaked CI on #523: TestProjectPicker::test_select_fills_the_existing_credential, which passes 3/3 locally on the same commit.

The default expiry is now computed once at import. Explicit exp= arguments are unchanged.

Shown both ways by forcing a one-second tick between two jwt() calls: old helper -> tokens differ; new helper -> identical. tests/test_vault_connectors.py: 83 passed, 1 skipped. Test-only change.

Mike and others added 2 commits October 4, 2026 16:01
jwt() took exp from time.time() on every call, so a test comparing a stored credential with an
expected one built a moment later failed whenever a clock second ticked between the two calls.
It flaked CI on PR #523 (TestProjectPicker::test_select_fills_the_existing_credential). Forcing a
one-second tick between two calls: old helper -> tokens differ, new -> identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MCERQUA
MCERQUA enabled auto-merge (squash) October 4, 2026 16:10
@MCERQUA
MCERQUA merged commit 5a932b0 into main Oct 4, 2026
2 checks passed
@MCERQUA
MCERQUA deleted the fix/flaky-vault-jwt-exp branch October 4, 2026 16:11
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.

1 participant