Filter out TestNG @⁠EJB tests in AOT end-to-end tests

See gh-29122
This commit is contained in:
Sam Brannen 2023-10-16 21:34:42 +02:00
parent 9cac5eeeab
commit 88cd0700b2
1 changed files with 4 additions and 2 deletions

View File

@ -137,11 +137,13 @@ class AotIntegrationTests extends AbstractAotTests {
// Scan all base packages in spring-test. // Scan all base packages in spring-test.
.scan("org.springframework.mock", "org.springframework.test") .scan("org.springframework.mock", "org.springframework.test")
// Or limit execution to a particular package and its subpackages. // Or limit execution to a particular package and its subpackages.
// - For example, to test @EJB and @PersistenceContext DI support: // - For example, to test JDBC support:
// .scan("org.springframework.test.context.testng.transaction.ejb") // .scan("org.springframework.test.context.jdbc")
// We only include test classes named *Tests so that we don't pick up // We only include test classes named *Tests so that we don't pick up
// internal TestCase classes that aren't really tests. // internal TestCase classes that aren't really tests.
.filter(clazz -> clazz.getSimpleName().endsWith("Tests")) .filter(clazz -> clazz.getSimpleName().endsWith("Tests"))
// We don't have a way to abort a TestNG test mid-flight, and @EJB is not supported in AOT.
.filter(clazz -> !clazz.getPackageName().contains("testng.transaction.ejb"))
.toList(); .toList();
// AOT BUILD-TIME: PROCESSING // AOT BUILD-TIME: PROCESSING