fix(ci): use static far-future expiry in parameterized Stripe test cases#73014
Open
mendral-app[bot] wants to merge 1 commit into
Open
fix(ci): use static far-future expiry in parameterized Stripe test cases#73014mendral-app[bot] wants to merge 1 commit into
mendral-app[bot] wants to merge 1 commit into
Conversation
The @parameterized.expand decorator evaluates its arguments at module load time, not test execution time. When timezone.now() + 10min was used, the expires_at value would become stale if the test suite took longer than 10 minutes to reach cases 5-8, causing them to receive 'expired' instead of the expected field validation errors. Replace with a static far-future timestamp (2099) that won't expire regardless of test suite duration. Fixes test_invalid_requests_are_rejected cases 5-8.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
rafaeelaudibert
approved these changes
Jul 22, 2026
rafaeelaudibert
enabled auto-merge (squash)
July 22, 2026 21:48
Contributor
🤖 CI report |
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
test_invalid_requests_are_rejectedcases 5-8) that have been failing on main since commit 3bf9839.@parameterized.expandevaluates arguments at module load time, sotimezone.now() + timedelta(minutes=10)becomes stale. In CI, by the time the test runner reaches these cases (10+ min later), theexpires_athas already passed and the serializer returnsexpiredbefore the view-level field validation ever runs.2099-01-01T00:00:00+00:00) that won't expire regardless of test suite duration.Note
Created by Mendral. Tag @mendral-app with feedback or questions.