From 1fb2a37957a732c4c935d3f3534be26d2f035347 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 16 Oct 2023 21:29:56 +0200 Subject: [PATCH] =?UTF-8?q?Apply=20@=E2=81=A0DisabledInAotMode=20for=20@?= =?UTF-8?q?=E2=81=A0EJB=20and=20SpEL=20usage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of the remaining failures are due to @⁠Resource usage. Current AOT test results for the spring-test module: Test run finished after 6140 ms [ 399 containers found ] [ 64 containers skipped ] [ 335 containers started ] [ 0 containers aborted ] [ 333 containers successful ] [ 2 containers failed ] [ 745 tests found ] [ 116 tests skipped ] [ 628 tests started ] [ 1 tests aborted ] [ 589 tests successful ] [ 38 tests failed ] Failing Test Classes: org.springframework.test.context.groovy.AbsolutePathGroovySpringContextTests org.springframework.test.context.groovy.GroovySpringContextTests org.springframework.test.context.groovy.RelativePathGroovySpringContextTests org.springframework.test.context.jdbc.BeforeTestClassSqlScriptsTests org.springframework.test.context.junit.jupiter.nested.TestExecutionListenersNestedTests org.springframework.test.context.junit.jupiter.nested.TestExecutionListenersNestedTests$ConfigOverriddenByDefaultTests org.springframework.test.context.junit.jupiter.nested.TestExecutionListenersNestedTests$InheritedAndExtendedConfigTests org.springframework.test.context.junit.jupiter.nested.TestExecutionListenersNestedTests$InheritedAndExtendedConfigTests$DoubleNestedWithOverriddenConfigTests org.springframework.test.context.junit.jupiter.nested.TestExecutionListenersNestedTests$InheritedAndExtendedConfigTests$DoubleNestedWithOverriddenConfigTests$TripleNestedWithInheritedConfigAndTestInterfaceTests org.springframework.test.context.junit.jupiter.orm.JpaEntityListenerTests org.springframework.test.context.junit4.AbsolutePathSpringJUnit4ClassRunnerAppCtxTests org.springframework.test.context.junit4.ClassPathResourceSpringJUnit4ClassRunnerAppCtxTests org.springframework.test.context.junit4.ConcreteTransactionalJUnit4SpringContextTests org.springframework.test.context.junit4.InheritedConfigSpringJUnit4ClassRunnerAppCtxTests org.springframework.test.context.junit4.MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests org.springframework.test.context.junit4.ParameterizedDependencyInjectionTests org.springframework.test.context.junit4.RelativePathSpringJUnit4ClassRunnerAppCtxTests org.springframework.test.context.junit4.SpringJUnit4ClassRunnerAppCtxTests org.springframework.test.context.junit4.annotation.AnnotationConfigSpringJUnit4ClassRunnerAppCtxTests org.springframework.test.context.junit4.spr9799.Spr9799XmlConfigTests org.springframework.test.context.testng.ConcreteTransactionalTestNGSpringContextTests See gh-29122 --- .../test/context/expression/ExpressionUsageTests.java | 4 +++- .../transaction/ejb/CommitForRequiredEjbTxDaoTests.java | 4 +++- .../transaction/ejb/CommitForRequiresNewEjbTxDaoTests.java | 4 +++- .../transaction/ejb/RollbackForRequiredEjbTxDaoTests.java | 4 +++- .../transaction/ejb/RollbackForRequiresNewEjbTxDaoTests.java | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/spring-test/src/test/java/org/springframework/test/context/expression/ExpressionUsageTests.java b/spring-test/src/test/java/org/springframework/test/context/expression/ExpressionUsageTests.java index 14f4772d44..c7a17fe3fe 100644 --- a/spring-test/src/test/java/org/springframework/test/context/expression/ExpressionUsageTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/expression/ExpressionUsageTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.test.context.aot.DisabledInAotMode; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; import static org.assertj.core.api.Assertions.assertThat; @@ -31,6 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer */ @SpringJUnitConfig +@DisabledInAotMode // SpEL is not supported in AOT class ExpressionUsageTests { @Autowired diff --git a/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiredEjbTxDaoTests.java b/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiredEjbTxDaoTests.java index 803b0031ee..e41f0ab346 100644 --- a/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiredEjbTxDaoTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiredEjbTxDaoTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package org.springframework.test.context.transaction.ejb; import org.springframework.test.annotation.Commit; import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.aot.DisabledInAotMode; import org.springframework.test.context.transaction.TransactionalTestExecutionListener; import org.springframework.test.context.transaction.ejb.dao.RequiredEjbTxTestEntityDao; @@ -32,6 +33,7 @@ import org.springframework.test.context.transaction.ejb.dao.RequiredEjbTxTestEnt */ @ContextConfiguration("required-tx-config.xml") @Commit +@DisabledInAotMode // @EJB is not supported in Spring AOT class CommitForRequiredEjbTxDaoTests extends AbstractEjbTxDaoTests { /* test methods in superclass */ diff --git a/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiresNewEjbTxDaoTests.java b/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiresNewEjbTxDaoTests.java index dfe40f9a94..f99dfd882e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiresNewEjbTxDaoTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiresNewEjbTxDaoTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package org.springframework.test.context.transaction.ejb; import org.springframework.test.annotation.Commit; import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.aot.DisabledInAotMode; import org.springframework.test.context.transaction.TransactionalTestExecutionListener; import org.springframework.test.context.transaction.ejb.dao.RequiresNewEjbTxTestEntityDao; @@ -32,6 +33,7 @@ import org.springframework.test.context.transaction.ejb.dao.RequiresNewEjbTxTest */ @ContextConfiguration("requires-new-tx-config.xml") @Commit +@DisabledInAotMode // @EJB is not supported in Spring AOT class CommitForRequiresNewEjbTxDaoTests extends AbstractEjbTxDaoTests { /* test methods in superclass */ diff --git a/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiredEjbTxDaoTests.java b/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiredEjbTxDaoTests.java index a7c9c1672c..7b5169be77 100644 --- a/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiredEjbTxDaoTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiredEjbTxDaoTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ package org.springframework.test.context.transaction.ejb; import org.junit.jupiter.api.Test; import org.springframework.test.annotation.Rollback; +import org.springframework.test.context.aot.DisabledInAotMode; import org.springframework.test.context.transaction.TransactionalTestExecutionListener; import static org.assertj.core.api.Assertions.assertThat; @@ -35,6 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @since 4.0.1 */ @Rollback +@DisabledInAotMode // @EJB is not supported in Spring AOT class RollbackForRequiredEjbTxDaoTests extends CommitForRequiredEjbTxDaoTests { /** diff --git a/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiresNewEjbTxDaoTests.java b/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiresNewEjbTxDaoTests.java index 4958c41002..deea771c16 100644 --- a/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiresNewEjbTxDaoTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiresNewEjbTxDaoTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package org.springframework.test.context.transaction.ejb; import org.springframework.test.annotation.Rollback; +import org.springframework.test.context.aot.DisabledInAotMode; import org.springframework.test.context.transaction.TransactionalTestExecutionListener; /** @@ -35,6 +36,7 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi * @since 4.0.1 */ @Rollback +@DisabledInAotMode // @EJB is not supported in Spring AOT class RollbackForRequiresNewEjbTxDaoTests extends CommitForRequiresNewEjbTxDaoTests { /* test methods in superclass */