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 broken ut SegmentDeletionRelevantPlaceTest #4607

Merged
merged 9 commits into from
Jun 6, 2022

Conversation

JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Apr 7, 2022

What problem does this PR solve?

Issue Number: close #4606

Problem Summary:
After #2415
SegmentDeletionRelevantPlaceTest::getSettings is not used at all, "SegmentDeletionRelevantPlaceTest" only run test with relevant_place with default value.

What is changed and how it works?

  • set the relevant_place settings by reload
  • Fix some clang-tidy lints on Segment unit tests
  • Rename dm_basic_include -> DMTestEnv

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

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Apr 7, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • flowbehappy
  • lidezhu

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 release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-triage-completed labels Apr 7, 2022
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 16, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 1, 2022
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Comment on lines -428 to -438
DB::Settings getSettings()
{
DB::Settings settings;
auto enable_relevant_place = GetParam();

if (enable_relevant_place)
settings.set("dt_enable_relevant_place", "1");
else
settings.set("dt_enable_relevant_place", "0");
return settings;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a useless function that never called after #2415

@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Jun 1, 2022

Coverage for changed files

Filename                                                         Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Flash/Management/tests/gtest_manual_compact.cpp                      905               315    65.19%          16                 0   100.00%         251                 4    98.41%         264               141    46.59%
Interpreters/IDAsPathUpgrader.cpp                                    452               142    68.58%          41                 2    95.12%         626               135    78.43%         270               119    55.93%
Storages/DeltaMerge/tests/DMTestEnv.h                                199                18    90.95%          19                 1    94.74%         326                43    86.81%         118                24    79.66%
Storages/DeltaMerge/tests/MultiSegmentTestUtil.h                     286                74    74.13%           5                 0   100.00%          72                 0   100.00%          76                36    52.63%
Storages/DeltaMerge/tests/gtest_convert_column.cpp                  1246               163    86.92%           6                 0   100.00%         343                 0   100.00%         428               195    54.44%
Storages/DeltaMerge/tests/gtest_data_streams.cpp                     120                12    90.00%           1                 0   100.00%          67                 0   100.00%          42                18    57.14%
Storages/DeltaMerge/tests/gtest_dm_delta_merge_store.cpp            6851              1829    73.30%          47                 1    97.87%        3059               103    96.63%        2262              1013    55.22%
Storages/DeltaMerge/tests/gtest_dm_delta_value_space.cpp            1148               167    85.45%          18                 1    94.44%         447                 5    98.88%         354               166    53.11%
Storages/DeltaMerge/tests/gtest_dm_file.cpp                         3253              1073    67.02%          38                 2    94.74%        1337                 4    99.70%         958               418    56.37%
Storages/DeltaMerge/tests/gtest_dm_minmax_index.cpp                 2093               377    81.99%          16                 0   100.00%         218                 0   100.00%         588               298    49.32%
Storages/DeltaMerge/tests/gtest_dm_segment.cpp                      3480               821    76.41%          37                 0   100.00%        1513                11    99.27%        1154               483    58.15%
Storages/DeltaMerge/tests/gtest_dm_segment_common_handle.cpp        1258               347    72.42%          17                 0   100.00%         813                23    97.17%         428               182    57.48%
Storages/DeltaMerge/tests/gtest_dm_storage_delta_merge.cpp          1770               351    80.17%          18                 0   100.00%         734                12    98.37%         564               267    52.66%
Storages/DeltaMerge/tests/gtest_dm_utils.cpp                          86                12    86.05%           4                 0   100.00%          56                 0   100.00%          24                12    50.00%
Storages/DeltaMerge/tests/gtest_version_filter.cpp                   939               134    85.73%           9                 0   100.00%         323                22    93.19%         290               134    53.79%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                              24086              5835    75.77%         292                 7    97.60%       10185               362    96.45%        7820              3506    55.17%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18281      9732             46.76%    204975  97565        52.40%

full coverage report (for internal network access only)

Copy link
Contributor

@lidezhu lidezhu 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 minor comments

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 4, 2022
JaySon-Huang and others added 2 commits June 6, 2022 11:58
Co-authored-by: lidezhu <47731263+lidezhu@users.noreply.github.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Jun 6, 2022

Coverage for changed files

Filename                                                         Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Flash/Management/tests/gtest_manual_compact.cpp                      905               315    65.19%          16                 0   100.00%         251                 4    98.41%         264               141    46.59%
Interpreters/IDAsPathUpgrader.cpp                                    452               142    68.58%          41                 2    95.12%         626               135    78.43%         270               119    55.93%
Storages/DeltaMerge/tests/DMTestEnv.h                                199                18    90.95%          19                 1    94.74%         326                43    86.81%         118                24    79.66%
Storages/DeltaMerge/tests/MultiSegmentTestUtil.h                     286                74    74.13%           5                 0   100.00%          72                 0   100.00%          76                36    52.63%
Storages/DeltaMerge/tests/gtest_convert_column.cpp                  1246               163    86.92%           6                 0   100.00%         343                 0   100.00%         428               195    54.44%
Storages/DeltaMerge/tests/gtest_data_streams.cpp                     120                12    90.00%           1                 0   100.00%          67                 0   100.00%          42                18    57.14%
Storages/DeltaMerge/tests/gtest_dm_delta_merge_store.cpp            6851              1829    73.30%          47                 1    97.87%        3059               103    96.63%        2262              1013    55.22%
Storages/DeltaMerge/tests/gtest_dm_delta_value_space.cpp            1148               167    85.45%          18                 1    94.44%         447                 5    98.88%         354               166    53.11%
Storages/DeltaMerge/tests/gtest_dm_file.cpp                         3253              1073    67.02%          38                 2    94.74%        1337                 4    99.70%         958               418    56.37%
Storages/DeltaMerge/tests/gtest_dm_minmax_index.cpp                 2093               377    81.99%          16                 0   100.00%         218                 0   100.00%         588               298    49.32%
Storages/DeltaMerge/tests/gtest_dm_segment.cpp                      3539               828    76.60%          37                 0   100.00%        1522                11    99.28%        1172               492    58.02%
Storages/DeltaMerge/tests/gtest_dm_segment_common_handle.cpp        1258               347    72.42%          17                 0   100.00%         813                23    97.17%         428               182    57.48%
Storages/DeltaMerge/tests/gtest_dm_storage_delta_merge.cpp          1773               351    80.20%          18                 0   100.00%         740                12    98.38%         564               267    52.66%
Storages/DeltaMerge/tests/gtest_dm_utils.cpp                          86                12    86.05%           4                 0   100.00%          56                 0   100.00%          24                12    50.00%
Storages/DeltaMerge/tests/gtest_version_filter.cpp                   939               134    85.73%           9                 0   100.00%         323                22    93.19%         290               134    53.79%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                              24148              5842    75.81%         292                 7    97.60%       10200               362    96.45%        7838              3515    55.15%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18281      9730             46.78%    205105  97583        52.42%

full coverage report (for internal network access only)

@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 Jun 6, 2022
@JaySon-Huang
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and 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.

If you have any questions about the PR merge process, please refer to pr process.

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: 2085bd6

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 6, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented Jun 6, 2022

Coverage for changed files

Filename                                                         Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Flash/Management/tests/gtest_manual_compact.cpp                      905               315    65.19%          16                 0   100.00%         251                 4    98.41%         264               141    46.59%
Interpreters/IDAsPathUpgrader.cpp                                    452               142    68.58%          41                 2    95.12%         626               135    78.43%         270               119    55.93%
Storages/DeltaMerge/tests/DMTestEnv.h                                199                18    90.95%          19                 1    94.74%         326                43    86.81%         118                24    79.66%
Storages/DeltaMerge/tests/MultiSegmentTestUtil.h                     286                74    74.13%           5                 0   100.00%          72                 0   100.00%          76                36    52.63%
Storages/DeltaMerge/tests/gtest_convert_column.cpp                  1246               163    86.92%           6                 0   100.00%         343                 0   100.00%         428               195    54.44%
Storages/DeltaMerge/tests/gtest_data_streams.cpp                     120                12    90.00%           1                 0   100.00%          67                 0   100.00%          42                18    57.14%
Storages/DeltaMerge/tests/gtest_dm_delta_merge_store.cpp            6851              1829    73.30%          47                 1    97.87%        3059               103    96.63%        2262              1013    55.22%
Storages/DeltaMerge/tests/gtest_dm_delta_value_space.cpp            1148               167    85.45%          18                 1    94.44%         447                 5    98.88%         354               166    53.11%
Storages/DeltaMerge/tests/gtest_dm_file.cpp                         3253              1073    67.02%          38                 2    94.74%        1337                 4    99.70%         958               418    56.37%
Storages/DeltaMerge/tests/gtest_dm_minmax_index.cpp                 2093               377    81.99%          16                 0   100.00%         218                 0   100.00%         588               298    49.32%
Storages/DeltaMerge/tests/gtest_dm_segment.cpp                      3539               828    76.60%          37                 0   100.00%        1522                11    99.28%        1172               492    58.02%
Storages/DeltaMerge/tests/gtest_dm_segment_common_handle.cpp        1258               347    72.42%          17                 0   100.00%         813                23    97.17%         428               182    57.48%
Storages/DeltaMerge/tests/gtest_dm_storage_delta_merge.cpp          1773               351    80.20%          18                 0   100.00%         740                12    98.38%         564               267    52.66%
Storages/DeltaMerge/tests/gtest_dm_utils.cpp                          86                12    86.05%           4                 0   100.00%          56                 0   100.00%          24                12    50.00%
Storages/DeltaMerge/tests/gtest_version_filter.cpp                   939               134    85.73%           9                 0   100.00%         323                22    93.19%         290               134    53.79%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                              24148              5842    75.81%         292                 7    97.60%       10200               362    96.45%        7838              3515    55.15%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18281      9730             46.78%    205105  97564        52.43%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit e3a4412 into pingcap:master Jun 6, 2022
@JaySon-Huang JaySon-Huang deleted the fix_broken_test branch June 6, 2022 11:01
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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 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.

The unit test SegmentDeletionRelevantPlaceTest is broken by accident
5 participants