Parallel testing
This merge request allows for tests to be run in parallel, resulting in about a 20x speedup of the test suite.
Locally, tests run to completion in under a minute, with the same coverage as shown in the previous release build process.
My local coverage (my worker.py is slightly modified, ignore the difference in statements/coverage for that one):
---------- coverage: platform linux, python 3.8.10-final-0 -----------
Name Stmts Miss Cover
--------------------------------------------------------------------
inventory_provider/__init__.py 46 0 100%
inventory_provider/app.py 13 13 0%
inventory_provider/config.py 7 0 100%
inventory_provider/db/__init__.py 0 0 100%
inventory_provider/db/ims.py 188 35 81%
inventory_provider/db/ims_data.py 224 39 83%
inventory_provider/environment.py 25 1 96%
inventory_provider/juniper.py 168 15 91%
inventory_provider/routes/__init__.py 0 0 100%
inventory_provider/routes/classifier.py 482 87 82%
inventory_provider/routes/classifier_schema.py 13 0 100%
inventory_provider/routes/common.py 182 21 88%
inventory_provider/routes/data.py 53 1 98%
inventory_provider/routes/default.py 22 0 100%
inventory_provider/routes/jobs.py 82 6 93%
inventory_provider/routes/lg.py 42 2 95%
inventory_provider/routes/lnetd.py 55 2 96%
inventory_provider/routes/mic.py 16 1 94%
inventory_provider/routes/msr.py 471 58 88%
inventory_provider/routes/neteng.py 45 2 96%
inventory_provider/routes/poller.py 503 14 97%
inventory_provider/routes/testing.py 126 37 71%
inventory_provider/snmp.py 70 9 87%
inventory_provider/tasks/__init__.py 0 0 100%
inventory_provider/tasks/app.py 13 4 69%
inventory_provider/tasks/common.py 101 29 71%
inventory_provider/tasks/config.py 31 5 84%
inventory_provider/tasks/monitor.py 107 13 88%
inventory_provider/tasks/worker.py 792 189 76%
--------------------------------------------------------------------
TOTAL 3877 583 85%
========================================================================= 738 passed, 11 skipped, 11063 warnings in 55.51s =========================================================================
The coverage from the last release build:
========= 738 passed, 11 skipped, 10978 warnings in 1261.25s (0:21:01) =========
py38: commands[2]> coverage xml
Wrote XML report to coverage.xml
py38: commands[3]> coverage html
Wrote HTML report to htmlcov/index.html
py38: commands[4]> coverage report --fail-under 80
Name Stmts Miss Cover
--------------------------------------------------------------------
inventory_provider/__init__.py 46 0 100%
inventory_provider/app.py 13 13 0%
inventory_provider/config.py 7 0 100%
inventory_provider/db/__init__.py 0 0 100%
inventory_provider/db/ims.py 188 35 81%
inventory_provider/db/ims_data.py 224 39 83%
inventory_provider/environment.py 25 1 96%
inventory_provider/juniper.py 168 15 91%
inventory_provider/routes/__init__.py 0 0 100%
inventory_provider/routes/classifier.py 482 87 82%
inventory_provider/routes/classifier_schema.py 13 0 100%
inventory_provider/routes/common.py 182 21 88%
inventory_provider/routes/data.py 53 1 98%
inventory_provider/routes/default.py 22 0 100%
inventory_provider/routes/jobs.py 82 6 93%
inventory_provider/routes/lg.py 42 2 95%
inventory_provider/routes/lnetd.py 55 2 96%
inventory_provider/routes/mic.py 16 1 94%
inventory_provider/routes/msr.py 471 58 88%
inventory_provider/routes/neteng.py 45 2 96%
inventory_provider/routes/poller.py 503 14 97%
inventory_provider/routes/testing.py 126 37 71%
inventory_provider/snmp.py 70 9 87%
inventory_provider/tasks/__init__.py 0 0 100%
inventory_provider/tasks/app.py 13 4 69%
inventory_provider/tasks/common.py 101 29 71%
inventory_provider/tasks/config.py 31 5 84%
inventory_provider/tasks/monitor.py 107 13 88%
inventory_provider/tasks/worker.py 786 183 77%
--------------------------------------------------------------------
TOTAL 3871 577 85%
Edited by Bjarke Madsen