tidb
tidb copied to clipboard
ttl: make some integration test faster
What problem does this PR solve?
Issue Number: close #56718
What changed and how does it work?
- Provides
boostJobScheduleForTestto make some intervals smaller to boost test. - Modify some cases to make it more reasonable and faster
In master, run tests in pkg/ttl/ttlworker takes 34.5s:
> X="run pkg/ttl/ttlworker" make ut
cd tools/check; \
GO111MODULE=on go build -o ../bin/ut ut.go
cd tools/check; \
GO111MODULE=on go build -o ../bin/xprog xprog.go
GOBIN=/Users/wangchao/Code/pingcap/tidb/tools/bin GO111MODULE=on go install github.com/pingcap/failpoint/failpoint-ctl@9b3b6e3
tools/bin/ut run pkg/ttl/ttlworker || { find $PWD/ -type d | grep -vE "(\.git|tools)" | xargs tools/bin/failpoint-ctl disable; exit 1; }
2024/10/18 12:09:12 maxprocs: Leaving GOMAXPROCS=10: CPU quota undefined
building task finish, parallelism=20, count=55, takes=1m3.719834292s
run all tasks takes 34.5330225s
In this PR, it takes 3.4s:
> X="run pkg/ttl/ttlworker" make ut
cd tools/check; \
GO111MODULE=on go build -o ../bin/ut ut.go
cd tools/check; \
GO111MODULE=on go build -o ../bin/xprog xprog.go
GOBIN=/Users/wangchao/Code/pingcap/tidb/tools/bin GO111MODULE=on go install github.com/pingcap/failpoint/failpoint-ctl@9b3b6e3
tools/bin/ut run pkg/ttl/ttlworker || { find $PWD/ -type d | grep -vE "(\.git|tools)" | xargs tools/bin/failpoint-ctl disable; exit 1; }
2024/10/18 12:11:16 maxprocs: Leaving GOMAXPROCS=10: CPU quota undefined
building task finish, parallelism=20, count=55, takes=30.296769208s
run all tasks takes 3.442459375s
Check List
Tests
- [x] 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.
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
Hi @lcwangchao. 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.
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-sigs/prow repository.
/retest
@lcwangchao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.
In response to this:
/retest
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-sigs/prow repository.
Codecov Report
Attention: Patch coverage is 82.71605% with 14 lines in your changes missing coverage. Please review.
Project coverage is 56.6010%. Comparing base (
457ff81) to head (2944c3f). Report is 15 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #56719 +/- ##
=================================================
- Coverage 73.3334% 56.6010% -16.7325%
=================================================
Files 1630 1755 +125
Lines 450148 633259 +183111
=================================================
+ Hits 330109 358431 +28322
- Misses 99772 250841 +151069
- Partials 20267 23987 +3720
| Flag | Coverage Δ | |
|---|---|---|
| integration | 36.9140% <30.3797%> (?) |
|
| unit | 72.6805% <82.7160%> (+0.2177%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Components | Coverage Δ | |
|---|---|---|
| dumpling | 52.9478% <ø> (ø) |
|
| parser | ∅ <ø> (∅) |
|
| br | 52.2122% <ø> (+6.6231%) |
:arrow_up: |
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: tiancaiamao, YangKeao
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [YangKeao,tiancaiamao]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
[LGTM Timeline notifier]
Timeline:
2024-10-19 03:28:10.167320343 +0000 UTC m=+62490.864110953: :ballot_box_with_check: agreed by YangKeao.2024-10-21 02:50:07.464499579 +0000 UTC m=+233008.161290181: :ballot_box_with_check: agreed by tiancaiamao.
/retest
@lcwangchao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.
In response to this:
/retest
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-sigs/prow repository.