Browse Source

Apply @⁠DisabledInAotMode for @⁠EJB and SpEL usage

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
pull/31445/head
Sam Brannen 1 year ago
parent
commit
1fb2a37957
  1. 4
      spring-test/src/test/java/org/springframework/test/context/expression/ExpressionUsageTests.java
  2. 4
      spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiredEjbTxDaoTests.java
  3. 4
      spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiresNewEjbTxDaoTests.java
  4. 4
      spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiredEjbTxDaoTests.java
  5. 4
      spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiresNewEjbTxDaoTests.java

4
spring-test/src/test/java/org/springframework/test/context/expression/ExpressionUsageTests.java

@ -1,5 +1,5 @@ @@ -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; @@ -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; @@ -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

4
spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiredEjbTxDaoTests.java

@ -1,5 +1,5 @@ @@ -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; @@ -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 @@ -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 */

4
spring-test/src/test/java/org/springframework/test/context/transaction/ejb/CommitForRequiresNewEjbTxDaoTests.java

@ -1,5 +1,5 @@ @@ -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; @@ -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 @@ -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 */

4
spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiredEjbTxDaoTests.java

@ -1,5 +1,5 @@ @@ -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; @@ -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; @@ -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 {
/**

4
spring-test/src/test/java/org/springframework/test/context/transaction/ejb/RollbackForRequiresNewEjbTxDaoTests.java

@ -1,5 +1,5 @@ @@ -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 @@ @@ -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 @@ -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 */

Loading…
Cancel
Save