Skip to content

tests: Use tk.MustHavePlan and tk.MustNotHavePlan instead of tk.HasPlan#46947

Merged
ti-chi-bot[bot] merged 26 commits intopingcap:masterfrom
Defined2014:fix-46945
Sep 15, 2023
Merged

tests: Use tk.MustHavePlan and tk.MustNotHavePlan instead of tk.HasPlan#46947
ti-chi-bot[bot] merged 26 commits intopingcap:masterfrom
Defined2014:fix-46945

Conversation

@Defined2014
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #46945

Problem Summary:

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@Defined2014 Defined2014 added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 13, 2023
@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 13, 2023
@tiprow
Copy link

tiprow bot commented Sep 13, 2023

Hi @Defined2014. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

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 kubernetes/test-infra repository.

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #46947 (2be2004) into master (62771ed) will decrease coverage by 0.5408%.
Report is 15 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #46947        +/-   ##
================================================
- Coverage   73.2424%   72.7016%   -0.5408%     
================================================
  Files          1332       1356        +24     
  Lines        397659     404014      +6355     
================================================
+ Hits         291255     293725      +2470     
- Misses        87750      91644      +3894     
+ Partials      18654      18645         -9     
Flag Coverage Δ
integration 28.6856% <ø> (?)
unit 73.2411% <ø> (-0.0013%) ⬇️

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

Components Coverage Δ
dumpling 53.9913% <ø> (-0.0532%) ⬇️
parser 84.9771% <ø> (-0.0033%) ⬇️
br 48.5539% <ø> (-4.3603%) ⬇️

@Defined2014
Copy link
Contributor Author

/test check-dev

@tiprow
Copy link

tiprow bot commented Sep 14, 2023

@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/test check-dev

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 kubernetes/test-infra repository.

@Defined2014 Defined2014 changed the title [WIP] tests: Use tk.MustHasPlan and tk.MustNotHasPlan instead of tk.HasPlan tests: Use tk.MustHasPlan and tk.MustNotHasPlan instead of tk.HasPlan Sep 14, 2023
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 14, 2023
@Defined2014 Defined2014 requested a review from winoros September 14, 2023 09:15
@Defined2014 Defined2014 removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 14, 2023
Copy link
Contributor

@mjonss mjonss left a comment

Choose a reason for hiding this comment

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

Suggestion to change the function name.

With 'Must' it changes the English grammar, so 'Must Have' is the correct form.

@Defined2014 Defined2014 changed the title tests: Use tk.MustHasPlan and tk.MustNotHasPlan instead of tk.HasPlan tests: Use tk.MustHavePlan and tk.MustNotHavePlan instead of tk.HasPlan Sep 14, 2023
@Defined2014 Defined2014 requested a review from xhebox September 14, 2023 13:20
Copy link
Contributor

@mjonss mjonss left a comment

Choose a reason for hiding this comment

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

LGTM with some suggestions and questions. Feel free to ignore them, since the PR is improving the situation anyway.

Comment on lines -906 to -913
{
// 3 table scans
"a < 2 or a < 10 or a > 11", []string{"1", "100"},
},
{
// 3 index scans
"c < 10 or c < 11 or c > 50", []string{"1", "10", "100"},
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these return "TableFullScan" or something else? Maybe the cases struct could be extended with matching MustHavePlan/MustNotHavePlan?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's TableFullScan. Not sure it should be checked in this test or not.

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Sep 14, 2023
@Defined2014
Copy link
Contributor Author

/test unit-test

@tiprow
Copy link

tiprow bot commented Sep 15, 2023

@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/test unit-test

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 kubernetes/test-infra repository.

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, mjonss

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

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 15, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 15, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-09-14 20:23:46.519506329 +0000 UTC m=+203392.487094379: ☑️ agreed by mjonss.
  • 2023-09-15 04:00:09.295637082 +0000 UTC m=+230775.263225132: ☑️ agreed by bb7133.

@tiprow
Copy link

tiprow bot commented Sep 15, 2023

@Defined2014: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
tiprow_fast_test 6156296 link true /test tiprow_fast_test

Full PR test history. Your PR dashboard.

Details

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 kubernetes/test-infra repository. I understand the commands that are listed here.

@Defined2014
Copy link
Contributor Author

/test check-dev

@tiprow
Copy link

tiprow bot commented Sep 15, 2023

@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/test check-dev

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 kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot merged commit 4c1f28b into pingcap:master Sep 15, 2023
@Defined2014 Defined2014 deleted the fix-46945 branch September 15, 2023 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use tk.MustHasPlan and tk.MustNotHasPlan instead of tk.HasPlan

3 participants