Browse Source

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

See gh-29122
pull/31445/head
Sam Brannen 1 year ago
parent
commit
88cd0700b2
  1. 6
      spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java

6
spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java

@ -137,11 +137,13 @@ class AotIntegrationTests extends AbstractAotTests { @@ -137,11 +137,13 @@ class AotIntegrationTests extends AbstractAotTests {
// Scan all base packages in spring-test.
.scan("org.springframework.mock", "org.springframework.test")
// Or limit execution to a particular package and its subpackages.
// - For example, to test @EJB and @PersistenceContext DI support:
// .scan("org.springframework.test.context.testng.transaction.ejb")
// - For example, to test JDBC support:
// .scan("org.springframework.test.context.jdbc")
// We only include test classes named *Tests so that we don't pick up
// internal TestCase classes that aren't really 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();
// AOT BUILD-TIME: PROCESSING

Loading…
Cancel
Save