test(checkout): A2c の同店 hold のテスト 2 件を fake clock に統一して決定化する (flaky 修正) - #640
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
「unresolved old payment scopes the relay checkout hold and notice」は、fixture の時刻が実時刻で 発行される一方 vi.waitFor が fake 時計を進め、遅延 import の完了前に通知が描画されると recovery のタイマーが未設置のまま期限判定に進む競合で、CI と並列負荷で時々落ちていた (#622 の CI・R14 レビューで 7 回中 2 回)。時計を setup 前に固定し、vi.dynamicImportSettled() を 待ってから期限の 1ms 前と期限へ明示的に進める。元の assert はすべて残し、期限ちょうどに 状態を 1 回読むことを追加で固定した。隣の「expiry read holds payment until %s completes」も 同じ原因で単独実行だと必ず落ちていた (先の test が module を読み込むおかげで通っていた) ため 同じ形に直した。単独 25/25・併走 10/10・負荷下の file 全体 368/368。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc
cipherwebllc
force-pushed
the
fix/r6-a2c-flaky-hold-test
branch
from
September 24, 2026 16:22
f795535 to
bd8a3f9
Compare
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.
概要
A2c (#607) で追加した CheckoutForm のテスト 2 件が、CI と並列負荷で時々落ちていました (#622 の CI で 1 回・R14 のレビューで 7 回中 2 回)。テストだけの変更で、本番コードには触れていません。
原因
fixture の時刻が実時刻で発行される一方、
vi.waitForが fake の時計を進めていました。遅延 import の完了前に通知が描画されると、recovery のタイマーが設置されないまま期限の判定に進み、toBeEnabledで落ちていました。隣の「expiry read holds payment until … completes」も同じ原因で、単独実行では必ず落ち、先のテストが module を読み込むおかげで通っていました。修正
vi.dynamicImportSettled()を待ってから、タイマーを期限の 1 ミリ秒前と期限まで明示的に進めます。検証
🤖 Generated with Claude Code
https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc