-
Notifications
You must be signed in to change notification settings - Fork 2
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
Running test cases in parallel #9
Comments
nosetests supports parallel execution of tests when run on a multi-core machine:
I updated prov_interop/interop_tests/test_converter.py to define the multiprocess_can_split variable required to use this feature:
Within the test_case method I changed the print statement to also print the process ID:
I changed the test output file names to include the process ID (as otherwise there would be a risk that one process might delete the output file name for another process):
If the tests on a 4 processor machine, and nosetests
then the tests are run in multiple processes:
Commit: ed8e7b21b84cf32a4e815626548e1618902de351 I updated prov_interop/provstore/converter.py to include a process ID as part of the document when it is placed within ProvStore (again to avoid requests clashing):
Commit: 4c0b9d68cbc7e7d4163a5e1f504e73e3ef985f32 I made similar changes to service-tests (in prov_service_tests/test_service.py and prov_service_tests/test_provstore.py). Commit: e53e89bcc3dd69d10dea2628eb996576ea93216f. |
This would not be of use in Travis. For Travis, their Parallelizing your builds across virtual machines recommends the use of their build matrix. An example of this was already used for interop-test-runner's .travis.yml to run compnent tests concurrently on Travis's virtual machines. If the test cases in the testcases repository were grouped into sub-directories, then the interoperability test harness could be run on each sub-directory in parallel. For example, here is a .travis.yml file build matrix that could be used in, for example provpy-interop-job's .travis.yml, that would run tests in parallel for subsets of the test cases, if they were placed into sub-directories:
As an example of this in use, a simplified version of the ProvPy .travis.yml file is:
When Travis CI runs this it spawns 8 jobs:
An excerpt from the log file of the first job is:
|
I haven't had a chance to set up the local Jenskin environment, but your solution seems to be suitable for that. I wlll look into setting this up. Thank you for investigate this. |
There are over 7,500 tests currently generated and running jobs over those is time consuming, especially with those having to access remote services. Since all tests are independent to one another, parallelising their running will potentially speed up the test jobs significantly.
The text was updated successfully, but these errors were encountered: