- Notifications
You must be signed in to change notification settings - Fork 29
Fix flaky test #57
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
Fix flaky test #57
Conversation
WalkthroughThe changes update the Brotli compression test in Changes
Sequence Diagram(s)sequenceDiagram participant TestRunner as Test Runner participant Brotli as Brotli Compression TestRunner->>Brotli: Compress input data Brotli-->>TestRunner: Return compressed data TestRunner->>TestRunner: Compute strlen(data) TestRunner->>TestRunner: Compare compressed size with strlen(data) TestRunner-->>TestRunner: Echo "default" with corrected message Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/streams_001.phpt (1)
9-9: Fixed typo in output message.The typo "defaul" has been corrected to "default" in the output message, improving clarity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/streams_001.phpt(3 hunks)
🔇 Additional comments (2)
tests/streams_001.phpt (2)
27-27: Improved test reliability by fixing the size comparison logic.The previous assertion compared
$size2against$size1, which could cause test failures when the default compression level achieves better compression than level 6. The updated logic now correctly validates that the compressed data is smaller than the original data, preventing the test from being flaky.This change directly addresses the PR objective of fixing the flaky test issue described in the PR summary.
38-38: Fixed typo in expected output to match the actual output message.The typo in the expected output has been corrected to ensure it matches the fixed output message from line 9, preventing test failures due to output mismatch.
| Thanks. |
This pull request fixes
streams_001.phptif the default compression level compresses better than level 6, which is specified in the test.Summary by CodeRabbit