Actually run JUnit 5 tests (#545)

* Actually run JUnit 5 tests

In Gradle, JUnit 5 must be explicitly enabled with a call to
test.useJUnitPlatform().

The FilteringTest used in :core must also enable JUnit5 separately.

Fixed AppEngineRule to work with the few tests that have migrated
to JUnit5.

More work is needed with AppEngine before we can migrate tests
that actually use Cloud SQL.

For context, with @EnableRuleMigrationSupport, JUnit 5 runner calls
an external resource's before() and after() methods. TestRule.apply()
is not called, therefore any setup done their will be bypassed with
JUnit 5.
This commit is contained in:
Weimin Yu 2020-04-06 13:26:38 -04:00 committed by GitHub
parent 3a7d71e411
commit 904f16c8b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 5 deletions

View file

@ -72,6 +72,10 @@ dependencies {
errorprone("com.google.errorprone:error_prone_core:2.3.3")
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile).configureEach {
// The -Werror flag causes Intellij to fail on deprecated api use.
// Allow IDE user to turn off this flag by specifying a Gradle VM