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

tools/check: fix timeout check script for parsing new tests #26723

Merged
merged 6 commits into from
Aug 2, 2021

Conversation

tiancaiamao
Copy link
Contributor

@tiancaiamao tiancaiamao commented Jul 29, 2021

What problem does this PR solve?

Problem Summary:

After the refactor #26022, some of the test output is changed.
So we have two kinds of output log:

PASS: sysvar_test.go:131: testSysVarSuite.TestIntValidation	0.000s
PASS: sysvar_test.go:454: testSysVarSuite.TestIsNoop	0.000s
PASS: sysvar_test.go:302: testSysVarSuite.TestMaxExecutionTime	0.000s
PASS: sysvar_test.go:429: testSysVarSuite.TestReadOnlyNoop	0.000s

--- PASS: TestSingle (0.26s)
--- PASS: TestCluster (4.20s)

In the past #26578, we only handle PASS: format.

What is changed and how it works?

What's Changed:

Parse this format --- PASS: TestCluster (4.20s)

Extract the timeout test cases from the log...

How it Works:

Make CI fail when a single test case runs longer than 4s (CI env is slower, so not 3s here)

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 Jul 29, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • wjhuang2016
  • xhebox

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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 29, 2021
@@ -12,6 +13,8 @@ var allowList = make(map[string]struct{})

func init() {
tmp := []string{
"TestT",
"TestCluster",
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 one is fixed after #26715

Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Quick and dirty 😆

LGTM.

@ti-chi-bot
Copy link
Member

@tisonkun: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

Quick and dirty 😆

LGTM.

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.

@tiancaiamao
Copy link
Contributor Author

/run-check_dev_2

[2021-07-29T07:06:55.982Z] The following test cases take too long to finish:
[2021-07-29T07:06:55.982Z] PASS: cte_test.go:244: CTETestSuite.TestCTEWithLimit	4.374s

But on my local machine

go test -check.f 'TestCTEWithLimit'

ok  	github.com/pingcap/tidb/executor	0.542s

@tiancaiamao
Copy link
Contributor Author

Why ... ?

[2021-07-29T07:18:42.888Z] The following test cases take too long to finish:
[2021-07-29T07:18:42.888Z] PASS: db_test.go:545: testDBSuite8.TestCancelAddPrimaryKey	4.061s

go test -check.f TestCancelAddPrimaryKey

ok  	github.com/pingcap/tidb/ddl	1.001s

@tiancaiamao
Copy link
Contributor Author

/run-check_dev_2

@tiancaiamao
Copy link
Contributor Author

[2021-07-29T07:29:48.935Z] The following test cases take too long to finish:
[2021-07-29T07:29:48.935Z] PASS: db_partition_test.go:631: testIntegrationSuite1.TestCreateTableWithListPartition	4.365s
[2021-07-29T07:29:48.935Z] PASS: db_test.go:561: testDBSuite7.TestCancelAddIndex	5.142s
[2021-07-29T07:29:48.935Z] PASS: db_test.go:545: testDBSuite8.TestCancelAddPrimaryKey	4.428s
[2021-07-29T07:29:48.935Z] PASS: stat_test.go:46: testSerialStatSuite.TestDDLStatsInfo	5.428s

OK... I will try it on another laptop

@tiancaiamao tiancaiamao requested a review from xhebox July 30, 2021 07:50
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 30, 2021
@tiancaiamao
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@tiancaiamao: /merge in this pull request requires 2 approval(s).

In response to this:

/merge

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.

@tiancaiamao
Copy link
Contributor Author

Relax the limitation to 5s ...
The CI env is not stable enough

@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 Aug 2, 2021
Copy link
Contributor

@zhouqiang-cl zhouqiang-cl left a comment

Choose a reason for hiding this comment

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

LGTM

@tiancaiamao
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: e2b3f97

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

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

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.

@zhouqiang-cl
Copy link
Contributor

/run-check_dev_2

@ti-chi-bot ti-chi-bot merged commit e199323 into pingcap:master Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none 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.

6 participants