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

test: fix TestWatchKeyspace #5493

Merged
merged 2 commits into from Sep 13, 2022
Merged

Conversation

AmoebaProtozoa
Copy link
Contributor

What problem does this PR solve?

Issue Number: Close #5481

What is changed and how does it work?

The original TestWatchKeyspace attempts to flush the testSuite storage by manually calling TearDownSuite and then SetupSuite, which causes the testSuite to be unstable.

This PR makes TestWatchKeyspace compare expected and actual result using re.Contains instead of doing direct indexed comparison, thus making flushing the storage unnecessary.

Check List

Tests

  • Integration test

Release note

none

Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 13, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • rleungx

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.

@AmoebaProtozoa
Copy link
Contributor Author

/cc @rleungx

@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Base: 75.62% // Head: 75.58% // Decreases project coverage by -0.03% ⚠️

Coverage data is based on head (74e9798) compared to base (5ca01a8).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5493      +/-   ##
==========================================
- Coverage   75.62%   75.58%   -0.04%     
==========================================
  Files         320      320              
  Lines       31622    31622              
==========================================
- Hits        23913    23901      -12     
- Misses       5645     5668      +23     
+ Partials     2064     2053      -11     
Flag Coverage Δ
unittests 75.58% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/dashboard/keyvisual/input/core.go 0.00% <0.00%> (-33.34%) ⬇️
server/tso/local_allocator.go 71.62% <0.00%> (-6.76%) ⬇️
server/storage/kv/etcd_kv.go 79.71% <0.00%> (-5.80%) ⬇️
server/region_syncer/server.go 78.02% <0.00%> (-3.85%) ⬇️
server/schedule/hbstream/heartbeat_streams.go 71.71% <0.00%> (-3.04%) ⬇️
server/api/region.go 67.63% <0.00%> (-1.45%) ⬇️
server/schedule/region_scatterer.go 78.71% <0.00%> (-1.21%) ⬇️
tools/pd-ctl/pdctl/command/operator.go 66.66% <0.00%> (-1.15%) ⬇️
pkg/btree/btree.go 86.26% <0.00%> (-0.97%) ⬇️
server/schedulers/evict_leader.go 78.57% <0.00%> (-0.90%) ⬇️
... and 18 more

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

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 13, 2022
@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 Sep 13, 2022
@lhy1024
Copy link
Contributor

lhy1024 commented Sep 13, 2022

/merge

@ti-chi-bot
Copy link
Member

@lhy1024: 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: 947662e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 13, 2022
@ti-chi-bot
Copy link
Member

@AmoebaProtozoa: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-chi-bot merged commit 596c86a into tikv:master Sep 13, 2022
@AmoebaProtozoa AmoebaProtozoa deleted the watch-keyspace-test branch September 13, 2022 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none 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.

TestWatchKeyspace is flaky
4 participants