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

Concurrent test runner #17

Merged
merged 3 commits into from Apr 8, 2017
Merged

Concurrent test runner #17

merged 3 commits into from Apr 8, 2017

Conversation

jacobstanley
Copy link
Member

This adds support for running tests concurrently.

screen shot 2017-04-08 at 7 29 30 pm

@jacobstanley jacobstanley merged commit 440b5bd into master Apr 8, 2017
@jacobstanley jacobstanley deleted the topic/concurrent branch April 8, 2017 09:46
@thumphries
Copy link
Member

thumphries commented Apr 8, 2017 via email

@jacobstanley
Copy link
Member Author

It does with a bit of help, see flushRegions and finishIndexedRegion

When you "finish" a region, that is what is printed in non-tty mode. The issue is that if you finish a region when a test actually completes then you get a somewhat random order of output. So those two functions make sure that we never finish a region before the tests which are ordered prior to it have also been finished. It's probably a bit pendantic, but it makes the whole thing feel a lot nicer.

-- > tests =
-- > $$(checkSequential)
--
checkSequential :: TExpQ (IO Bool)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have mentioned this before, but I often wondered whether it would be better to generate just the bare minimum, and then do the "running" at the top level. So rather than IO Bool, just generate the bare minimum Map Name Source. That said, you may be planning to have files that are either sequential and some concurrent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you'd be able to better distribute the load that way, but we'd need a way to mark a test a concurrent or sequential, maybe per property is a better approach anyway

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