Skip to content

[RateLimiter] bug #42194 fix: sliding window policy to use microtime - fix test #43688

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2021
Merged

[RateLimiter] bug #42194 fix: sliding window policy to use microtime - fix test #43688

merged 1 commit into from
Oct 26, 2021

Conversation

jlekowski
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #42194
License MIT
Doc PR symfony/symfony-docs#...

As pointed out in the comment #43677 (comment), RateLimitTest::testWaitUsesMicrotime() fails intermittently.
I have looked at all PHPUnit actions since the test was introduced and interestingly, the fails only occurred during 7.2 test, and the time difference was always ~1.3s.

@jlekowski
Copy link
Contributor Author

@chalasr, this should make the test pass consistently.

@Nyholm, @wouterj - I appreciate it if you review this one too. Thank you.

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. The remaining failures are unrelated?

@jlekowski
Copy link
Contributor Author

jlekowski commented Oct 26, 2021

Thank you. The remaining failures are unrelated?

Yes, they are unrelated.

@chalasr
Copy link
Member

chalasr commented Oct 26, 2021

Thank you @jlekowski.

@chalasr chalasr merged commit 1c79d80 into symfony:5.4 Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RateLimiter] SlidingWindow to use microtime() instead of time()
3 participants