Skip to content
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

Merged
merged 4 commits into from
Apr 17, 2023
Merged

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Apr 13, 2023

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

  • Unit test

Release note

None.

Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Apr 13, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • binshi-bing

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Apr 13, 2023
@ti-chi-bot ti-chi-bot requested review from disksing and JmPotato April 13, 2023 10:03
@rleungx rleungx requested review from binshi-bing and removed request for disksing April 13, 2023 10:04
@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.10 ⚠️

Comparison is base (0e42a50) 75.19% compared to head (1b3baaf) 75.10%.

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     
Flag Coverage Δ
unittests 75.10% <ø> (-0.10%) ⬇️

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -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
Copy link
Contributor

@binshi-bing binshi-bing Apr 13, 2023

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, good catch.

Copy link
Member Author

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.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 13, 2023
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 17, 2023
@JmPotato
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

@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.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 1b3baaf

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 17, 2023
@ti-chi-bot ti-chi-bot merged commit 8c9b4fb into tikv:master Apr 17, 2023
@rleungx rleungx deleted the fix-unstable-test2 branch April 17, 2023 09:27
rleungx added a commit to rleungx/pd that referenced this pull request Jun 5, 2023
* *: 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestLogicalOverflow failed
4 participants