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 unit test and make test running serially. #16525

Merged
merged 3 commits into from
Apr 20, 2020

Conversation

wshwsh12
Copy link
Contributor

@wshwsh12 wshwsh12 commented Apr 17, 2020

What problem does this PR solve?

Issue Number: close #16328

Problem Summary: UT fails. Root cause is running unit test parallelly (some prepare plan cache test.)

What is changed and how it works?

What's Changed: Run test serially.

How it Works:

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test

Side effects

Release note

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

preparedPlanCache is in session level, each test is supposed to use a new TestKit, which would have its own session, why would they interfere with each other?

@wshwsh12
Copy link
Contributor Author

preparedPlanCache is in session level, each test is supposed to use a new TestKit, which would have its own session, why would they interfere with each other?

preparedPlanCacheEnabledValue is used for all session. If one test changes the value, the other session will be affected.

@wshwsh12 wshwsh12 force-pushed the fix_prepare_plan_cache_ut branch from e566187 to ea59274 Compare April 20, 2020 07:55
@wshwsh12 wshwsh12 requested review from a team as code owners April 20, 2020 07:55
@ghost ghost requested review from SunRunAway and lzmhhh123 and removed request for a team April 20, 2020 07:55
@wshwsh12 wshwsh12 requested a review from eurekaka April 20, 2020 07:58
@codecov
Copy link

codecov bot commented Apr 20, 2020

Codecov Report

Merging #16525 into master will decrease coverage by 0.0833%.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             master     #16525        +/-   ##
================================================
- Coverage   80.4561%   80.3727%   -0.0834%     
================================================
  Files           506        506                
  Lines        136964     136754       -210     
================================================
- Hits         110196     109913       -283     
- Misses        18189      18251        +62     
- Partials       8579       8590        +11     

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason
Copy link
Member

@wshwsh12 Does the release branches have this issue?

@zz-jason
Copy link
Member

Would it impact the UT testing speed? cc @glorv

Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@wshwsh12 wshwsh12 changed the title session: create SimpleLRUCache when switching the option enable-prepared-plan-cache. session: fix unit test enable-prepared-plan-cache. Apr 20, 2020
@wshwsh12 wshwsh12 changed the title session: fix unit test enable-prepared-plan-cache. session: fix unit test and make test running serially. Apr 20, 2020
@wshwsh12 wshwsh12 changed the title session: fix unit test and make test running serially. test: fix unit test and make test running serially. Apr 20, 2020
@glorv
Copy link
Contributor

glorv commented Apr 20, 2020

Would it impact the UT testing speed? cc @glorv

These tests are fast, so the impact is small and acceptable

@wshwsh12 wshwsh12 added status/LGT2 Indicates that a PR has LGTM 2. status/can-merge Indicates a PR has been approved by a committer. labels Apr 20, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Apr 20, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Apr 20, 2020

cherry pick to release-2.1 in PR #16612

@sre-bot
Copy link
Contributor

sre-bot commented Apr 20, 2020

cherry pick to release-3.0 in PR #16613

@sre-bot
Copy link
Contributor

sre-bot commented Apr 20, 2020

cherry pick to release-3.1 in PR #16614

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Apr 20, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Apr 20, 2020

cherry pick to release-4.0 in PR #16615

@wshwsh12 wshwsh12 deleted the fix_prepare_plan_cache_ut branch January 29, 2022 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression component/test sig/execution SIG execution 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.

executor_test.go:testSuiteP2.TestCurrentTimestampValueSelection failed
6 participants