ConsoleRunner bugfix for @TestSerial and other test cleanups

Review Request #4026 — Created June 27, 2016 and submitted

Eric Ayers
pants
zundel/add-jburst-test
3604
4027
72cd15a...
pants-reviews
benjyw, gmalmquist, nhoward_tw, stuhood, wisechengyi

This change started as just adding tests to show that parallelization is working correctly under Parameterized and BurstJUnit4 test runners, but ended up also finding a bug.

  • Fix bug in ConsoleRunnerImpl
  • Don't run parallel methods when test class is annotated with @TestSerial or @TestParallel
  • Fix testing bug in all Concurrency related tests - reset the concurrency parameters before each test permutation
  • Fix testing bug in ParallelMethodsDefaultParallelTest1: only wait for 2 tests to start
  • Fix testing bug that -default-concurrency flag was overwritten in ConsoleRunnerTestBase
  • Add MockParameterizedTest and friends to show tests running parallel under the Parameterized test runner library
  • Add MockBurstTest and friends to show tests running parallel under the Burst library
  • Use assumeThat() to skip test permutations that won't work with specified tests

Added several new unit tests

CI running at https://travis-ci.org/pantsbuild/pants/builds/140590946

Eric Ayers
Garrett Malmquist
  1. Ship It!
  2. 
      
Chris Heisterkamp
  1. 
      
  2. Should we also update the version of the junit library since ConsoleRunnerImpl has changed?

    1. Yes, but unfortunately, we can't do that until after this lands and I publish a new one. So it will require a second PR (I recently just did this to get your changes to support assertThat being tagged properly as ignored).

  3. nit: two spaces instead of one.

    1. I think I got all of these

    1. Prettied up the imports in this and other files.

  4. 
      
Eric Ayers
Stu Hood
  1. Ship It!
  2. 
      
Eric Ayers
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks Stu, Chris, Garrett. Commit c432f6d

Loading...