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,ut: add long flag for tests and adopt long flag in ut tool #58492

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Dec 23, 2024

What problem does this PR solve?

Issue Number: close #58491

Problem Summary:

We have written some long time go tests. It'd be better to provide a tool to run it.

What changed and how does it work?

  1. Add a -long flag to the tests.
  2. Modify the ut to support running these long tests.
  3. Modify the log of TTL to have richer information.

The simplest way to try this PR is to run the following commands:

make tools/bin/ut
./tools/bin/ut run --long --race

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.
      This PR only modifies test and log.

Release note

None

@ti-chi-bot ti-chi-bot bot added the release-note-none Denotes a PR that doesn't merit a release note. label Dec 23, 2024
Copy link

ti-chi-bot bot commented Dec 23, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from yangkeao, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

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

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 the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 23, 2024
Signed-off-by: Yang Keao <[email protected]>
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 73.4196%. Comparing base (ef7ade7) to head (8573336).
Report is 4 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58492        +/-   ##
================================================
- Coverage   73.5359%   73.4196%   -0.1163%     
================================================
  Files          1681       1681                
  Lines        464055     466352      +2297     
================================================
+ Hits         341247     342394      +1147     
- Misses       101997     103147      +1150     
  Partials      20811      20811                
Flag Coverage Δ
integration 43.1836% <0.0000%> (?)
unit 72.3100% <77.7777%> (+0.0119%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.3316% <ø> (-0.4351%) ⬇️

cd tools/check; \
$(GO) build -o ../bin/ut ut.go
$(GO) build -o ../bin/ut ut.go longtests.go
Copy link
Collaborator

Choose a reason for hiding this comment

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

Clould we also support make ut-long?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. It'll be a good QoL change. Let me do it.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a flag -long for test, and provide a tool to run all long tests
2 participants