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

[PoC] Run the unit tests in parallel #670

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

lslezak
Copy link
Member

@lslezak lslezak commented Aug 25, 2020

Problem

Running the unit tests takes quite long time, we should run the tests in parallel to speed it up. We already use that solution in the yast2-storage-ng package.

Todo

  • Fix the missing require
  • Fix the Storage::LockException problem (according to @imobachgs we should run the storage related tests in one process, the other option would be to mock the storage calls)
  • Adapt the .spec file (like here)
  • Fix code coverage reporting

Note: the Storage::LockException happens only with more parallel processes (16), Travis uses just 2 CPUs so it does not happen there, the affected tests coincidentally run in the same process.

Results

  • On my machine the test duration went down from 30s to 10s (3x faster) (using a 8C/16T CPU)
  • At Travis the speed up is smaller (only 2 CPUs) and it highly depends how fast the worker machine is (it might actaully take the same time, see parallel tests and the standard tests).
  • The question is how faster it will be in OBS, but the builds usually use 4 or 8 CPUs so the speed up should be pretty good there.

@coveralls
Copy link

Coverage Status

Coverage decreased (-23.5%) to 34.991% when pulling 092b849 on parallel_tests into 52039cb on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants