Re-enable BlockHound integration tests

Prior to this commit, our BlockHound integration tests were disabled
after the migration to a JDK 17 baseline since the build now always
runs on JDK 14 or higher.

To re-enable the tests we now supply the deprecated
-XX:+AllowRedefinitionToAddDeleteMethods command-line argument to the JVM
for tests in the Gradle build. Users can also configure this manually
within an IDE to run SpringCoreBlockHoundIntegrationTests.

If that command-line argument is removed from the JVM at some point in
the future, we will need to investigate an alternative solution.

See https://github.com/reactor/BlockHound/issues/33 for details.
This commit is contained in:
Sam Brannen
2022-01-11 14:54:59 +01:00
parent f2fe8a87fa
commit 5aefcd2fdb
2 changed files with 18 additions and 6 deletions

View File

@@ -92,4 +92,10 @@ test {
// Make sure the classes dir is used on the test classpath (required by ResourceTests).
// When test fixtures are involved, the JAR is used by default.
classpath = sourceSets.main.output.classesDirs + classpath - files(jar.archiveFile)
// Ensure that BlockHound tests run on JDK 13+. For details, see:
// https://github.com/reactor/BlockHound/issues/33
jvmArgs += [
"-XX:+AllowRedefinitionToAddDeleteMethods"
]
}