commit 593543e781c5b7ade7ff638e4249f8707605a32e Author: Eric Ayers Date: Tue May 10 05:37:16 2016 -0400 junit-runner: Separate out parsing specs from making list of requests Essentially, a yak shave for adding support for an experimental test runner. - Rename classes that are ParentRunner subclasses - Create a class that parses and validates command line specs for tests - Add tests for annotation overrides - Add a flag to the runner to turn on an experimental test runner (for future use) Testing Done: Added some new unit tests CI green at https://travis-ci.org/pantsbuild/pants/builds/129012882 Bugs closed: 3369 Reviewed at https://rbcommons.com/s/twitter/r/3846/ .../tools/junit/impl/CompositeRequestRunner.java | 78 +++++++++++++ .../impl/ConcurrentCompositeRequestRunner.java | 50 ++++++++ .../tools/junit/impl/ConsoleRunnerImpl.java | 128 +++++++++++---------- src/java/org/pantsbuild/tools/junit/impl/Spec.java | 53 +++++++++ .../pantsbuild/tools/junit/impl/SpecException.java | 19 +++ .../pantsbuild/tools/junit/impl/SpecParser.java | 124 ++++++++++++++++++++ 6 files changed, 393 insertions(+), 59 deletions(-) commit 94388b356d5df0330e7aab219f78605f66027125 Author: Eric Ayers Date: Tue Apr 26 19:23:07 2016 -0400 New -default-concurrency parameter to junit-runner Followon to https://rbcommons.com/s/twitter/r/3707/ this creates a new command line parameter for the JUnit runner that will allow us to more precisely specify the type of concurrency desired. Testing Done: Updated ConsoleRunnerTest and added two new test cases to show serial behavior for classes not annotated with @TestSerial CI green at https://travis-ci.org/pantsbuild/pants/builds/125445433 Bugs closed: 3191, 3265 Reviewed at https://rbcommons.com/s/twitter/r/3753/ .../pantsbuild/tools/junit/impl/Concurrency.java | 24 ++++++++++ .../junit/impl/ConcurrentRunnerScheduler.java | 20 ++++---- .../tools/junit/impl/ConsoleRunnerImpl.java | 55 +++++++++++++++++----- 3 files changed, 78 insertions(+), 21 deletions(-) commit d5c18bd661bbb129f3dec3fbd8bddba9a3dd7f2c Author: Eric Ayers Date: Tue Apr 26 19:20:17 2016 -0400 Enhance parallel testing junit_tests Surfaces EXPERIMENTAL support for parallel testing of methods within a test class. - Adds a 'concurrency' parameter to set test concurrency to 'SERIAL' 'PARALLEL_CLASSES', 'PARALLEL_METHODS', or 'PARALLEL_BOTH' - Adds a 'threads' parameter to junit_tests to control concurrency. - Adds a --test-junit-default-concurrency option - PARALLEL_BOTH will allow both classes and methods to run in parallel for the entire test run - PARALLEL_METHODS (just run methods within a class in parallel) is flagged as not implemented - Added a number of unit test cases and integration tests to exercise these features Note that there is a bug in that the @TestSerial annotation is not respected when the -parallel-methods flag is in use. See https://github.com/pantsbuild/pants/issues/3209 Followup work for this change is to add an `@TestParallelMethods` annotation and come up with a more rational way to pass concurrency options to the junit-runner backend. Testing Done: Integration test and additional unit tests added. CI is green at https://travis-ci.org/pantsbuild/pants/builds/125429738 Bugs closed: 3191, 3210, 3262 Reviewed at https://rbcommons.com/s/twitter/r/3707/ src/java/org/pantsbuild/tools/junit/impl/ConsoleRunnerImpl.java | 3 +++ 1 file changed, 3 insertions(+) commit ef1e7f6771437ca36b48952f97736661a3090cbd Author: Eric Ayers Date: Sun Apr 24 11:18:34 2016 -0400 Revert "Enhance parallel testing junit_tests" This reverts commit 438d299bac8c58e5cbe236e9edeac3497baf5bcc. src/java/org/pantsbuild/tools/junit/impl/ConsoleRunnerImpl.java | 3 --- 1 file changed, 3 deletions(-) commit 438d299bac8c58e5cbe236e9edeac3497baf5bcc Author: Eric Ayers Date: Sun Apr 24 11:15:20 2016 -0400 Enhance parallel testing junit_tests Surfaces EXPERIMENTAL support for parallel testing of methods within a test class. - Adds a 'concurrency' parameter to set test concurrency to 'serial' 'parallel', or 'parallel_method' - Adds a 'threads' parameter to junit_tests to control concurrency. - Adds a --test-junit-parallel-methods to allow methods to run in parallel for the entire test run - Added a number of unit test cases and integration tests to exercise these features Note that there is a bug in that the @TestSerial annotation is not respected when the -parallel-methods flag is in use. See https://github.com/pantsbuild/pants/issues/3209 Followup work for this change is to add an `@TestParallelMethods` annotation and come up with a more rational way to pass concurrency options to the junit-runner backend. Testing Done: Integration test and additional unit tests added. CI is green at https://travis-ci.org/pantsbuild/pants/builds/123712609 Bugs closed: 3191, 3210 Reviewed at https://rbcommons.com/s/twitter/r/3707/ src/java/org/pantsbuild/tools/junit/impl/ConsoleRunnerImpl.java | 3 +++ 1 file changed, 3 insertions(+)