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

Parallel test execution #6

Merged
merged 2 commits into from
Nov 11, 2016
Merged

Parallel test execution #6

merged 2 commits into from
Nov 11, 2016

Conversation

bosonogi
Copy link
Member

@bosonogi bosonogi commented Nov 8, 2016

New "jobs" (-j) argument for specifying the number of threads to use
when running tests.

concurrent.futures.ThreadPoolExecutor is used for parallel test execution, the added "futures" dependency backports this feature to Python 2.7.

If a -j command line argument is not specified (or is set to one), the cwltest commands behaves as it did before these changes -- with the exception that Ctrl+C needs to be pressed two times to interrupt test execution (because test execution is offloaded to separate threads).

Toni Ruza added 2 commits November 8, 2016 09:11
New "jobs" (-j) argument for specifying the number of threads to use
when running tests.
@mr-c
Copy link
Member

mr-c commented Nov 8, 2016

Hello @bosonogi and thank you for your contribution!

This is super useful, though I wonder if it would be better to switch to pytest** as we would get this feature (via pytest-xdist) and JUnitXML output for free without having to maintain those features ourselves.

**or another Python testing framework that support JUnitXML output, parallel testing, and generating tests.

If that sounds like something fun to you then go for it; otherwise I can review+merge this and move my idea to an issue for another day.

@bosonogi
Copy link
Member Author

bosonogi commented Nov 8, 2016

Hi @mr-c

Switching to an established testing framework seams like it would take significantly more effort than what was spent here. The JUnitXML schema is fairly simple, and improving how it is generated by cwltest (for eg. adding test execution times and stderr outputs) also seams like much less effort than restructuring the entire thing.

Making the switch does feel like a right-thing-to-do(tm) in the long run; however as the conformance tests are data driven and those frameworks are all geared towards hand-written tests, the actual practical gains in doing so are not immediately obvious and/or significant to me at this point -- so I would rather we leave that idea for another day.

@StarvingMarvin
Copy link
Member

While i also think that using existing testing framework makes sense, I'm not sure why wouldn't we merge this improvement, as it is already developed, and isn't big change.

@mr-c mr-c merged commit 7d45057 into common-workflow-language:master Nov 11, 2016
@mr-c
Copy link
Member

mr-c commented Nov 11, 2016

@StarvingMarvin I already said I was fine with merging it; feel free to press the button next time :-)

@bosonogi bosonogi deleted the parallel-test-execution branch November 14, 2016 11:14
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

3 participants