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: optimize the time of run test cases #2621

Merged

Conversation

HusterWan
Copy link
Contributor

@HusterWan HusterWan commented Dec 27, 2018

Signed-off-by: ziren.wzr ziren.wzr@alibaba-inc.com

Ⅰ. Describe what this PR did

Since our integration test cases run about 30mins, the more test cases, the longer the running time.

So, we can optimize some test cases to decrease the running time, like:

  • first stop the container with timeout 1 then delete it
  • add timeout to 1 when stop a container

Let's see if we can decrease the running time of the integration test cases :)

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Signed-off-by: ziren.wzr <ziren.wzr@alibaba-inc.com>
@codecov
Copy link

codecov bot commented Dec 27, 2018

Codecov Report

Merging #2621 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2621      +/-   ##
==========================================
- Coverage   69.07%   68.99%   -0.08%     
==========================================
  Files         279      279              
  Lines       18834    18834              
==========================================
- Hits        13009    12995      -14     
- Misses       4360     4372      +12     
- Partials     1465     1467       +2
Flag Coverage Δ
#criv1alpha1test 31.42% <ø> (+0.04%) ⬆️
#criv1alpha2test 35.65% <ø> (-0.07%) ⬇️
#integrationtest 41.16% <ø> (-0.03%) ⬇️
#nodee2etest 32.74% <ø> (-0.12%) ⬇️
#unittest 26.78% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pkg/streams/utils.go 82.14% <0%> (-9.53%) ⬇️
apis/server/utils.go 71.15% <0%> (-3.85%) ⬇️
daemon/mgr/spec_linux.go 76.74% <0%> (-1%) ⬇️
ctrd/container.go 58.1% <0%> (-0.8%) ⬇️
daemon/mgr/container.go 58.79% <0%> (-0.43%) ⬇️
cri/v1alpha2/cri.go 68.06% <0%> (-0.13%) ⬇️
cri/v1alpha2/cri_wrapper.go 66.8% <0%> (+1.2%) ⬆️
ctrd/image.go 78.18% <0%> (+2.27%) ⬆️

@HusterWan
Copy link
Contributor Author

before this pr:

image

after this pr:

image

Saved 3 minutes

@allencloud
Copy link
Collaborator

This helps a lot for #1184.

@allencloud
Copy link
Collaborator

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Dec 27, 2018
@allencloud allencloud merged commit daeca08 into AliyunContainerService:master Dec 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/test LGTM one maintainer or community participant agrees to merge the pull reuqest. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants