Browse Source

Register hints for test execution event annotations in the TCF

See gh-29044
pull/29049/head
Sam Brannen 4 years ago
parent
commit
40647bdaf6
  1. 9
      spring-test/src/main/java/org/springframework/test/context/aot/hint/TestContextRuntimeHints.java
  2. 9
      spring-test/src/test/java/org/springframework/test/context/aot/TestContextAotGeneratorTests.java

9
spring-test/src/main/java/org/springframework/test/context/aot/hint/TestContextRuntimeHints.java

@ -99,6 +99,15 @@ class TestContextRuntimeHints implements RuntimeHintsRegistrar { @@ -99,6 +99,15 @@ class TestContextRuntimeHints implements RuntimeHintsRegistrar {
// Application Events
org.springframework.test.context.event.RecordApplicationEvents.class,
// Test execution events
org.springframework.test.context.event.annotation.AfterTestClass.class,
org.springframework.test.context.event.annotation.AfterTestExecution.class,
org.springframework.test.context.event.annotation.AfterTestMethod.class,
org.springframework.test.context.event.annotation.BeforeTestClass.class,
org.springframework.test.context.event.annotation.BeforeTestExecution.class,
org.springframework.test.context.event.annotation.BeforeTestMethod.class,
org.springframework.test.context.event.annotation.PrepareTestInstance.class,
// JUnit Jupiter
org.springframework.test.context.junit.jupiter.EnabledIf.class,
org.springframework.test.context.junit.jupiter.DisabledIf.class,

9
spring-test/src/test/java/org/springframework/test/context/aot/TestContextAotGeneratorTests.java

@ -153,6 +153,15 @@ class TestContextAotGeneratorTests extends AbstractAotTests { @@ -153,6 +153,15 @@ class TestContextAotGeneratorTests extends AbstractAotTests {
// Application Events
org.springframework.test.context.event.RecordApplicationEvents.class,
// Test execution events
org.springframework.test.context.event.annotation.AfterTestClass.class,
org.springframework.test.context.event.annotation.AfterTestExecution.class,
org.springframework.test.context.event.annotation.AfterTestMethod.class,
org.springframework.test.context.event.annotation.BeforeTestClass.class,
org.springframework.test.context.event.annotation.BeforeTestExecution.class,
org.springframework.test.context.event.annotation.BeforeTestMethod.class,
org.springframework.test.context.event.annotation.PrepareTestInstance.class,
// JUnit Jupiter
org.springframework.test.context.junit.jupiter.EnabledIf.class,
org.springframework.test.context.junit.jupiter.DisabledIf.class,

Loading…
Cancel
Save