demery-pivotal opened a new pull request #6890:
URL: https://github.com/apache/geode/pull/6890


   Migrate all uses of `JUnitParamsRunner` to use a new runner that can be
   made compatible with JUnit 5.
   
   PROBLEM
   
   We want to upgrade Geode to use JUnit 5. JUnit 5 includes a test engine
   called JUnit Vintage, which it uses to run JUnit 4 tests. JUnit Vintage
   interacts with test runners differently than JUnit 4 did.
   
   `JUnitParamsRunner` is incompatible with JUnit Vintage in several ways:
   - When `JUnitParamsRunner` describes parameterized tests, it discards
     the `@Category` annotation that JUnit Vintage uses to filter tests by
     category.
   - When JUnit Vintage asks `JUnitParamsRunner` to filter tests by name,
     the runner fails to apply the filter to parameterized tests.
   
   The net result is that when JUnit Vintage tries to filter tests by
   category, `JUnitParamsRunner` runs every parameterized test, including
   tests that lack the category. This affects the Windows Gfsh distributed
   test job in particular, causing it to run 900 tests instead of the
   desired 200. Numerous of the extra 700 tests fail on Windows.
   
   This problem prevents us from upgrading to JUnit 5.
   
   `JUnitParamsRunner` is no longer maintained. It will not be made
   compatible with JUnit Vintage.
   
   Approximately 140 test classes use `JUnitParamsRunner`. To upgrade to
   JUnit 5, we will have to migrate all of these tests to use a runner
   compatible with JUnit Vintage.
   
   SOLUTION
   
   The solution involves two steps:
   1. Migrate every existing use of `JUnitParamsRunner` to instead use a
      new `GeodeParamsRunner` that behaves identically to
      `JUnitParamsRunner`.
   2. Upgrade Geode to use JUnit 5.
   
   This PR implements step 1. This PR implements a "dummy" version of
   `GeodeParamsRunner` that behaves identically to `JUnitParamsRunner`. Its
   only purpose is to allow migrating approximately 140 test classes to use
   the new runner name.
   
   I will implement step 2 in a later PR. This will include re-implementing
   `GeodeParamsRunner` to be compatible with JUnit 5. (I have verified the
   viability of this via a spike.)
   
   Separating the "migrate the tests" and "upgrade JUnit" steps into
   separate PRs makes each PR much more focused and much easier to review.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to