MetOffice / MetOffice/CDDS

Use pytest-xdist or similar package for running tests in parallel

Open
#528 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

migrated
Dominant language
Python
Stars
8
Forks
7
Avg merge
1d 15h
Merged PRs (30d)
23

Description

Migrated Jira Issue CDDSO-225
Jira creation date 06/12/2022 15:12

Some initial testing with [https://pytest-xdist.readthedocs.io/en/latest/|https://pytest-xdist.readthedocs.io/en/latest/|smart-link] has been quite promising, with tests taking roughly less than half the normal time whilst running on the VLD.

--> py.test -s cdds --doctest-modules .............    success! [841 passed, 81 deselected, 21 warnings in 15.36s]
--> py.test -s cdds -n auto --dist loadscope -m slow     success! [33 passed, 21 warnings in 141.98s (0:02:21)]
--> py.test -s cdds -n auto --dist loadscope -m integration     success! [2 passed, 4 warnings in 6.71s]
--> py.test -s cdds -n auto --dist loadscope -m data_request     success! [36 passed, 74 warnings in 34.49s]
Executing tests for mip_convert:
--> py.test -s mip_convert --doctest-modules -n auto     success! [712 passed, 23 warnings in 8.84s]
--> py.test -s mip_convert -m mappings -n auto ....    success! [57 passed, 8 warnings in 7.92s]
--> py.test -s mip_convert -m slow -n auto ........    success! [37 passed, 1 skipped, 762 warnings in 102.26s (0:01:42)]
++++++++++++++++++++++++++++++++++++++++++++++
Elapsed time: 0:05:21.822561
All tests succeed.
None 😄```

Need to modify ``command.extend(test.split(' ', 1))`` to ``command.extend(test.split(' '))`` in order to get extra options that are added to work correctly.
-------

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository for command.extend(test.split(' ', 1)) and inspect how test commands and extra options are assembled. Update the argument handling so added options work correctly, then run the listed pytest commands and confirm that the test suites complete successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.