-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
server: make CI faster #26546
server: make CI faster #26546
Conversation
Yep. I post a script that we might build a fixture for timeout under #26289. For report, I'd suggest add a ci task to generate from JUnit provides a nice example which Golang ecosystem lack of. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 60f613b
|
What problem does this PR solve?
Problem Summary:
CI of the server package take too long...
What is changed and how it works?
Before:
After:
What's Changed:
Make some test case faster.
How it Works:
A lot of the tests are very slow, some are caused by the wait here
tidb/ddl/ddl.go
Lines 691 to 696 in e7d7371
Here it sleeps about 2.5s, in the test code it doesn't really matter to sleep or not.
B.T.W, the real solution to make CI faster is to set a time limit for a single test cases
#26289
If we skip the tests that runs longer than 2s, we can finish the test much faster, and this is how long it really should be:
If we want to archive the goal of finishing the whole unit test within 3min, we can't just ask some colleague to optimize it.
"Hey, our CI is slow, could you help me to optimize it a bit?"
This is not sustainable, sooner or later it will slow down again.
#26289 is a better solution, under that limitation, if a test case can not finish within 3s, the author should optimize it, otherwise move it out of the unit test. Maybe a integration test is better place for such case.
@zhouqiang-cl @tisonkun
Even better if we can monitor the CI time cost and have a dashboard for it, so we can see how it changes.
Check List
Tests
Side effects
Documentation
Release note