square/spoon — pull request #197 by olivierg13 (2014-08-29 12:39:57+00:00)
Title: Synchronous pool

Hello @JakeWharton

There is my pull request for doing a synchronous pool of Thread (run tests device by device).
I use an ExecutorService, constructed thanks to Executors.newSingleThreadExecutor().

The principle of the CountDownLatch is still intact, it simply runs on the ExecutorService if "synchronousPool" is set to true, and runs on a normal Thread otherwise.

I modified both the SpoonRunner.Builder() and the RunMojo Maven Plugin to get the parameter (thanks to the argument --synchronous-pool or -DsynchronousPool).

By the way, do you know an easy way of testing the Maven plugin locally?

Do not hesitate to tell me if something is wrong, or if I can improve something for the next pull request. (I mean, this is my first pull request, I hope this will be suitable ^^).

Cheers,

Olivier Goutay