-
Notifications
You must be signed in to change notification settings - Fork 728
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 TestLogicalOverflow
#6320
Conversation
Signed-off-by: Ryan Leung <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #6320 +/- ##
==========================================
- Coverage 75.19% 75.10% -0.10%
==========================================
Files 404 404
Lines 39860 39860
==========================================
- Hits 29972 29936 -36
- Misses 7275 7303 +28
- Partials 2613 2621 +8
Flags with carried forward coverage won't be shown. Click here to find out more. see 24 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@@ -163,12 +163,13 @@ func TestLogicalOverflow(t *testing.T) { | |||
re.NoError(tsoClient.Send(req)) | |||
_, err = tsoClient.Recv() | |||
re.NoError(err) | |||
if i == 1 { | |||
// the 2nd request may (but not must) overflow, as max logical interval is 262144 | |||
re.Less(time.Since(begin), updateInterval+20*time.Millisecond) // additional 20ms for gRPC latency |
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.
Is it possible that "+20*time.Millisecond) // additional 20ms for gRPC latency" causes random failure when even loopback latency on test host is longer than this value or there is unexpected slowness in the test code execution somehow?
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.
Yes, good catch.
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.
But it's a local environment, so the latency might not be that slow. We can solve it after we encounter it.
/merge |
@JmPotato: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 1b3baaf
|
* *: fix `TestConcurrentlyReset` (tikv#6318) close tikv#6275 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ti Chi Robot <[email protected]> * *: fix unexpected log (tikv#6286) close tikv#6285 Signed-off-by: Ryan Leung <[email protected]> * *: make TestGlobalAndLocalTSO stable (tikv#6292) close tikv#6250 Signed-off-by: Ryan Leung <[email protected]> * *: fix `TestLogicalOverflow` (tikv#6320) close tikv#6277 Signed-off-by: Ryan Leung <[email protected]> --------- Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]> Co-authored-by: Ti Chi Robot <[email protected]>
What problem does this PR solve?
Issue Number: Close #6277.
What is changed and how does it work?
Even if the
updateInterval
is 50ms, we can still encounter the problem. This PR adds one more request to make sure the test can be passed every time.Check List
Tests
Release note