From 88cd0700b2e4de0a5123b317ea71eeeb8c110a2c Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 16 Oct 2023 21:34:42 +0200 Subject: [PATCH] =?UTF-8?q?Filter=20out=20TestNG=20@=E2=81=A0EJB=20tests?= =?UTF-8?q?=20in=20AOT=20end-to-end=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See gh-29122 --- .../test/context/aot/AotIntegrationTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java b/spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java index b79117a0bc..a990ba4ed0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java @@ -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