Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[12.x] Fix flaky test in ArraySessionHandler (garbage collection)#57904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@sumaiazaman
Copy link
Contributor

This PR fixes a flaky test by freezing time before the write operation intest_it_cleans_up_old_sessions.

Problem:
Without freezing time, there's a small window where time can advance between when the session is written (which records a timestamp) and when the garbage collection check occurs. This can cause the test to fail intermittently.

Solution:
AddCarbon::setTestNow(Carbon::now()); before the firstwrite() operation to ensure consistent timing throughout the test.

Related:
This follows the same pattern as#57864.

This prevents timing race conditions where time can advance betweenwhen the session is written (which records a timestamp) and whenthe garbage collection check occurs, causing intermittent test failures.
@taylorotwelltaylorotwell merged commit6ec8614 intolaravel:12.xNov 25, 2025
76 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@sumaiazaman@taylorotwell

[8]ページ先頭

©2009-2025 Movatter.jp