If you run ./gradlew :beam-runners-direct-java:needsRunnerTests, and look at the produced test report, one can see that it is missing tests that have RunWith(Enclosed.class), e.g. ParDoTest, CombineTest, MetricsTest etc.
This is very very bad - some of these tests are already known to be (silently) broken.
Likely https://github.com/gradle/gradle/issues/2985 . As an emergency measure, let's convert to top-level classes.