Skip to content
This repository was archived by the owner on Apr 30, 2020. It is now read-only.

The integration tests take ages (not that much anymore, but still) #45

Closed
hroncok opened this issue Feb 2, 2018 · 10 comments
Closed

The integration tests take ages (not that much anymore, but still) #45

hroncok opened this issue Feb 2, 2018 · 10 comments

Comments

@hroncok
Copy link
Member

hroncok commented Feb 2, 2018

The integration tests were parallelized in #62 but this keeps open because the time is still not ideal.

Original issue follows:


(Especially after #44.)

  • we check 13 koji builds, maybe we can get rid of some and reuse more of them?
  • on Travis CI, we might split the tests into groups (based on the used fixtures) and use the Build Matrix to run ~4 groups of integration tests at the same time
  • locally we could try to do the same and parallelize the tests, however when we run stuff in mock, we can only run one check at a time, so this might be very hard
@kparal
Copy link
Collaborator

kparal commented Feb 28, 2018

Today I have massively sped up our test suite execution in mock from 100 seconds to 15 seconds by using gather_facts: no in our playbooks. See here:
https://pagure.io/taskotron/libtaskotron/c/bfa4e5de672e433db9f070d1cff94878eb5e5812

The problem is that network is disabled in mock and ansible times out when gathering certain facts. Since you don't use any facts in tests.yml, I suggest you try adding the same thing and compare the test suite execution time.

@hroncok
Copy link
Member Author

hroncok commented Feb 28, 2018

Thanks for the tip. I'll do some testing, but our mock has networking enabled.

@hroncok
Copy link
Member Author

hroncok commented Feb 28, 2018

As is (two measurements):

real	9m1,968s
user	6m35,021s
sys	0m27,029s
real	9m4,934s
user	6m54,039s
sys	0m28,724s

@hroncok
Copy link
Member Author

hroncok commented Feb 28, 2018

Disabling gathering facts:

real	9m7,752s
user	6m47,682s
sys	0m26,951s
real	8m45,465s
user	6m32,248s
sys	0m25,697s

I don't think there's any difference. But I can make more measurements over night.

@kparal
Copy link
Collaborator

kparal commented Feb 28, 2018

If it has networking enabled, then no, there won't be any significant speed up.

@hroncok
Copy link
Member Author

hroncok commented May 28, 2018

I have an idea how to make the mock calls parallel runnable. If it works, we can try to run the testsuite with pytest-xdist.

@hroncok
Copy link
Member Author

hroncok commented May 28, 2018

OK, so problem with xdist is that it doesn't group by fixture, so the parallelism is completely useless.

hroncok added a commit to hroncok/taskotron-python-versions that referenced this issue May 28, 2018
This is an attempt to fix fedora-python#45

It does the following:

 * uses pytest-xdist to paralelize the tests (3 workers)
 * utilizes custom scheduler that splits the tests acroding to the fixture name
   * this is needed not to use 1 fixture on multiple workers
     see pytest-dev/pytest-xdist#18
 * use parametrize an all integration tests to enbale our hackish scheduler
 * mock now creates the roots in pwd (not to pollute the filesystem on /)
   * note that the roots can take sveral GBs
hroncok added a commit to hroncok/taskotron-python-versions that referenced this issue May 28, 2018
This is an attempt to fix fedora-python#45

It does the following:

 * uses pytest-xdist to paralellize the tests (3 workers)
 * utilizes custom scheduler that splits the tests according to the fixture name
   * this is needed not to use 1 fixture on multiple workers
     see pytest-dev/pytest-xdist#18
 * use parametrize an all integration tests to enable our hackish scheduler
 * mock now creates the roots in pwd (not to pollute the filesystem on /)
   * note that the roots can take several GBs
@hroncok
Copy link
Member Author

hroncok commented May 28, 2018

#62

@hroncok
Copy link
Member Author

hroncok commented May 30, 2018

Ok, this is now better but not perfect.

@hroncok hroncok reopened this May 30, 2018
@hroncok hroncok changed the title The integration tests take ages The integration tests take ages (not that much anymore, but still) May 30, 2018
@hroncok
Copy link
Member Author

hroncok commented Apr 7, 2020

Closing, Taskotron goes EOL on 2020-04-30.

@hroncok hroncok closed this as completed Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants