Skip to content

Commit 88cd070

Browse files
committed
Filter out TestNG @⁠EJB tests in AOT end-to-end tests
See gh-29122
1 parent 9cac5ee commit 88cd070

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,13 @@ void endToEndTestsForEntireSpringTestModule() {
137137
// Scan all base packages in spring-test.
138138
.scan("org.springframework.mock", "org.springframework.test")
139139
// Or limit execution to a particular package and its subpackages.
140-
// - For example, to test @EJB and @PersistenceContext DI support:
141-
// .scan("org.springframework.test.context.testng.transaction.ejb")
140+
// - For example, to test JDBC support:
141+
// .scan("org.springframework.test.context.jdbc")
142142
// We only include test classes named *Tests so that we don't pick up
143143
// internal TestCase classes that aren't really tests.
144144
.filter(clazz -> clazz.getSimpleName().endsWith("Tests"))
145+
// We don't have a way to abort a TestNG test mid-flight, and @EJB is not supported in AOT.
146+
.filter(clazz -> !clazz.getPackageName().contains("testng.transaction.ejb"))
145147
.toList();
146148

147149
// AOT BUILD-TIME: PROCESSING

0 commit comments

Comments
 (0)