-
Notifications
You must be signed in to change notification settings - Fork 162
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 SlidingBloomReplayCacheTest.cpp #96
Closed
Closed
Conversation
This file contains 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
Closed
facebook-github-bot
pushed a commit
to facebook/sapling
that referenced
this pull request
Jul 24, 2023
Summary: github diffs were showing the full set of commits in the stack rather than just the commits for the given PR version gitHubPullRequestComparableVersions was returning null for base commit, which meant we always fell back on the } else if (afterBaseCommitID != null) { branch of gitHubPullRequestVersionDiff. That fallback used to work fine, but now its giving us the base of the full stack rather than the base of the PR. I don't know how it worked before (perhaps github api behaviour changed?), but there you go! Fix is to use the version.baseParent in gitHubPullRequestComparableVersions, which has the right value in it. Pull Request resolved: #684 Test Plan: yarn test --watchAll=false Local build and run: Before, https://reviewstack.dev/facebookincubator/fizz/pull/96 shows changes for full stack: ![image](https://github.com/facebook/sapling/assets/14246801/932463ed-9132-4efe-8672-92a72ca2bd7c) After, http://localhost:3000/facebookincubator/fizz/pull/96 shows only relevant changes for PR: ![image](https://github.com/facebook/sapling/assets/14246801/7e8466b6-4a40-4d70-9bb6-7e4182294018) Reviewed By: zzl0 Differential Revision: D47707437 Pulled By: sggutier fbshipit-source-id: aeead996e11cddc68b844b63151e378247a4493e
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.
Can you fix the "// 1.5 seconds in, " comment as well
@AjanthanAsogamoorthy done, no need for the comment to repeat the chrono calls |
SlidingBloomReplayCacheTest.cpp test was flaky, looks like the expiry can happen at exactly 1 second, moving to 1001 milliseconds fixed it. Updated associated comments to remove the time periods as was duplicative of the chrono call just below the comments Test Plan: Run locally ``` ./build/fbcode_builder/getdeps.py build --src-dir=. fizz ./build/fbcode_builder/getdeps.py test --src-dir=. fizz ``` before, fails with: ``` [==========] 5 tests from 1 test suite ran. (1115 ms total) [ PASSED ] 4 tests. [ FAILED ] 1 test, listed below: [ FAILED ] SlidingBloomReplayCacheTest.TestTimeBucketing 1 FAILED TEST ``` after, passes with: ``` 100% tests passed, 0 tests failed out of 68 Total Test time (real) = 1.07 sec ```
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.
fix flaky SlidingBloomReplayCacheTest.cpp
SlidingBloomReplayCacheTest.cpp test was flaky, looks like the expiry
can happen at exactly 1 second, moving to 1001 milliseconds fixed it.
Updated associated comments to remove the time periods as was
duplicative of the chrono call just below the comments
Test Plan:
Run locally
before, fails with:
after, passes with:
Stack created with Sapling. Best reviewed with ReviewStack.