Skip to content

Test: refine Executor Unit Test#5889

Merged
ti-chi-bot merged 5 commits intopingcap:masterfrom
SeaRise:refine_executor_test
Sep 15, 2022
Merged

Test: refine Executor Unit Test#5889
ti-chi-bot merged 5 commits intopingcap:masterfrom
SeaRise:refine_executor_test

Conversation

@SeaRise
Copy link
Contributor

@SeaRise SeaRise commented Sep 14, 2022

What problem does this PR solve?

Issue Number: ref #4609

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

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 14, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Lloyd-Pottiger
  • ywqzzy

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.

Details

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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 14, 2022
@SeaRise SeaRise requested review from xzhangxian1008 and ywqzzy and removed request for xzhangxian1008 September 14, 2022 11:20
@SeaRise SeaRise changed the title .*: refine Executor Unit Test Test: refine Executor Unit Test Sep 14, 2022
@SeaRise
Copy link
Contributor Author

SeaRise commented Sep 14, 2022

/run-unit-test

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 14, 2022

Coverage for changed files

Filename                                       Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Flash/tests/gtest_aggregation_executor.cpp         123                35    71.54%           7                 0   100.00%         191                 1    99.48%          30                20    33.33%
Flash/tests/gtest_filter_executor.cpp               24                14    41.67%           3                 0   100.00%          42                 0   100.00%           8                 8     0.00%
Flash/tests/gtest_join_executor.cpp                108                56    48.15%          11                 0   100.00%         345                 0   100.00%          42                32    23.81%
Flash/tests/gtest_limit_executor.cpp                29                 7    75.86%           3                 0   100.00%          32                 0   100.00%          14                 4    71.43%
Flash/tests/gtest_projection_executor.cpp          183                35    80.87%          10                 0   100.00%         315                 0   100.00%          30                20    33.33%
Flash/tests/gtest_topn_executor.cpp                 50                15    70.00%           5                 0   100.00%         129                 2    98.45%          22                 9    59.09%
Flash/tests/gtest_window_executor.cpp               93                28    69.89%           9                 0   100.00%         337                 0   100.00%          26                16    38.46%
TestUtils/ExecutorTestUtils.cpp                     61                 7    88.52%          19                 1    94.74%         157                11    92.99%          48                 5    89.58%
TestUtils/ExecutorTestUtils.h                        3                 1    66.67%           3                 1    66.67%          18                13    27.78%           0                 0         -
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                              674               198    70.62%          70                 2    97.14%        1566                27    98.28%         220               114    48.18%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18747      8125             56.66%    217102  83465        61.55%

full coverage report (for internal network access only)

.build(context);
result.emplace_back(toNullableVec<String>({"b0b", "c0c", "d0d", {}, "f0f", "g0g", "h0h", {}}));
executeWithConcurrency(request, result);
executeAndAssertColumnsEqual(request, result);
Copy link
Contributor

Choose a reason for hiding this comment

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

How can we print the line number in gtest_xxx.cpp when test failed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point

Copy link
Contributor Author

Choose a reason for hiding this comment

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

now the fail msg will be

Value of: assert_func(executeStreams(request, concurrency))
  Actual: false (
Columns rows mismatch
expected_rows: 0
actual_rows: 1)
Expected: true
test info:
    file: /data1/huanghaisheng/git-repo/tiflash/dbms/src/Flash/tests/gtest_limit_executor.cpp
    line: 50
    test_case_name: ExecutorLimitTestRunner
    test_func_name: Limit
    enable_planner: false
    concurrency: 1
    block_size: 1
    dag_request: 
limit_1 | 1
 table_scan_0 | {<0, String>}

std::function<void(const ColumnsWithTypeAndName &)> assert_func)
{
WRAP_FOR_DIS_ENABLE_PLANNER_BEGIN
std::vector<size_t> concurrencies{1, 2, 10};
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should provide some ways to set the concurrency policy, such as number of concurrencies or degree of concurrency, by users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think they can use executeStream(dagrequest, concurrency) directly.
Specifying a specific degree of concurrency is a rare requirement.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 14, 2022
@xzhangxian1008
Copy link
Contributor

lgtm

@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 15, 2022
@SeaRise
Copy link
Contributor Author

SeaRise commented Sep 15, 2022

/merge

@ti-chi-bot
Copy link
Member

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

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

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

DetailsCommit hash: 2cf249d

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

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

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 ti-community-infra/tichi repository.

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 15, 2022

Coverage for changed files

Filename                                       Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Flash/tests/gtest_aggregation_executor.cpp         123                35    71.54%           7                 0   100.00%         191                 1    99.48%          30                20    33.33%
Flash/tests/gtest_filter_executor.cpp               24                14    41.67%           3                 0   100.00%          42                 0   100.00%           8                 8     0.00%
Flash/tests/gtest_join_executor.cpp                108                56    48.15%          11                 0   100.00%         345                 0   100.00%          42                32    23.81%
Flash/tests/gtest_limit_executor.cpp                29                 7    75.86%           3                 0   100.00%          32                 0   100.00%          14                 4    71.43%
Flash/tests/gtest_projection_executor.cpp          183                35    80.87%          10                 0   100.00%         315                 0   100.00%          30                20    33.33%
Flash/tests/gtest_topn_executor.cpp                 50                15    70.00%           5                 0   100.00%         129                 2    98.45%          22                 9    59.09%
Flash/tests/gtest_window_executor.cpp               93                28    69.89%           9                 0   100.00%         337                 0   100.00%          26                16    38.46%
TestUtils/ExecutorTestUtils.cpp                     67                10    85.07%          20                 2    90.00%         213                37    82.63%          50                 6    88.00%
TestUtils/ExecutorTestUtils.h                        3                 1    66.67%           3                 1    66.67%          18                13    27.78%           0                 0         -
WindowFunctions/tests/gtest_lead_lag.cpp           131                49    62.60%          12                 0   100.00%         345                 1    99.71%          32                28    12.50%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                              811               250    69.17%          83                 3    96.39%        1967                54    97.25%         254               143    43.70%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18748      8126             56.66%    217157  83527        61.54%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit 047d919 into pingcap:master Sep 15, 2022
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/XL Denotes a PR that changes 500-999 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.

6 participants