Skip to content

fix(ci): use static far-future expiry in parameterized Stripe test cases#73014

Open
mendral-app[bot] wants to merge 1 commit into
masterfrom
mendral/fix-stripe-provisioning-test-expiry
Open

fix(ci): use static far-future expiry in parameterized Stripe test cases#73014
mendral-app[bot] wants to merge 1 commit into
masterfrom
mendral/fix-stripe-provisioning-test-expiry

Conversation

@mendral-app

@mendral-app mendral-app Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes 4 broken test cases (test_invalid_requests_are_rejected cases 5-8) that have been failing on main since commit 3bf9839.
  • Root cause: @parameterized.expand evaluates arguments at module load time, so timezone.now() + timedelta(minutes=10) becomes stale. In CI, by the time the test runner reaches these cases (10+ min later), the expires_at has already passed and the serializer returns expired before the view-level field validation ever runs.
  • Fix: use a static far-future timestamp (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.

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.
@mendral-app
mendral-app Bot requested a review from rafaeelaudibert July 22, 2026 21:28
@trunk-io

trunk-io Bot commented Jul 22, 2026

Copy link
Copy Markdown

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

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

@mendral-app
mendral-app Bot marked this pull request as ready for review July 22, 2026 21:46
@rafaeelaudibert
rafaeelaudibert enabled auto-merge (squash) July 22, 2026 21:48
@github-actions

Copy link
Copy Markdown
Contributor

🤖 CI report

Playwright — all passed

All tests passed.

View test results →

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