Browse Source

Document order values for TestExecutionListener implementations

Closes gh-34265

Signed-off-by: Mengqi Xu <2663479778@qq.com>
pull/34656/head
Mengqi Xu 11 months ago committed by Sam Brannen
parent
commit
128e90064e
  1. 7
      spring-test/src/main/java/org/springframework/test/context/event/ApplicationEventsTestExecutionListener.java
  2. 5
      spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java
  3. 7
      spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java
  4. 7
      spring-test/src/main/java/org/springframework/test/context/observation/MicrometerObservationRegistryTestExecutionListener.java
  5. 7
      spring-test/src/main/java/org/springframework/test/context/support/CommonCachesTestExecutionListener.java
  6. 7
      spring-test/src/main/java/org/springframework/test/context/support/DependencyInjectionTestExecutionListener.java
  7. 7
      spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextBeforeModesTestExecutionListener.java
  8. 7
      spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java
  9. 7
      spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java
  10. 5
      spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java

7
spring-test/src/main/java/org/springframework/test/context/event/ApplicationEventsTestExecutionListener.java

@ -61,7 +61,12 @@ public class ApplicationEventsTestExecutionListener extends AbstractTestExecutio @@ -61,7 +61,12 @@ public class ApplicationEventsTestExecutionListener extends AbstractTestExecutio
/**
* Returns {@code 1800}.
* Returns {@code 1800}, which ensures that the {@code ApplicationEventsTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener
* DirtiesContextBeforeModesTestExecutionListener} and just before the
* {@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener
* BeanOverrideTestExecutionListener}.
*/
@Override
public final int getOrder() {

5
spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java

@ -98,7 +98,10 @@ import org.springframework.test.context.support.AbstractTestExecutionListener; @@ -98,7 +98,10 @@ import org.springframework.test.context.support.AbstractTestExecutionListener;
public class EventPublishingTestExecutionListener extends AbstractTestExecutionListener {
/**
* Returns {@code 10000}.
* Returns {@code 10000}, which ensures that the {@code EventPublishingTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener
* SqlScriptsTestExecutionListener}.
*/
@Override
public final int getOrder() {

7
spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java

@ -126,7 +126,12 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen @@ -126,7 +126,12 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
/**
* Returns {@code 5000}.
* Returns {@code 5000}, which ensures that the {@code SqlScriptsTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.transaction.TransactionalTestExecutionListener
* TransactionalTestExecutionListener} and just before the
* {@link org.springframework.test.context.event.EventPublishingTestExecutionListener
* EventPublishingTestExecutionListener}.
*/
@Override
public final int getOrder() {

7
spring-test/src/main/java/org/springframework/test/context/observation/MicrometerObservationRegistryTestExecutionListener.java

@ -107,7 +107,12 @@ class MicrometerObservationRegistryTestExecutionListener extends AbstractTestExe @@ -107,7 +107,12 @@ class MicrometerObservationRegistryTestExecutionListener extends AbstractTestExe
/**
* Returns {@code 2500}.
* Returns {@code 2500}, which ensures that the {@code MicrometerObservationRegistryTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.support.DependencyInjectionTestExecutionListener
* DependencyInjectionTestExecutionListener} and just before the
* {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener
* DirtiesContextTestExecutionListener}.
*/
@Override
public final int getOrder() {

7
spring-test/src/main/java/org/springframework/test/context/support/CommonCachesTestExecutionListener.java

@ -36,7 +36,12 @@ import org.springframework.test.context.TestContext; @@ -36,7 +36,12 @@ import org.springframework.test.context.TestContext;
public class CommonCachesTestExecutionListener extends AbstractTestExecutionListener {
/**
* Returns {@code 3005}.
* Returns {@code 3005}, which ensures that the {@code CommonCachesTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener
* DirtiesContextTestExecutionListener} and just before the
* {@link org.springframework.test.context.transaction.TransactionalTestExecutionListener
* TransactionalTestExecutionListener}.
*/
@Override
public final int getOrder() {

7
spring-test/src/main/java/org/springframework/test/context/support/DependencyInjectionTestExecutionListener.java

@ -63,7 +63,12 @@ public class DependencyInjectionTestExecutionListener extends AbstractTestExecut @@ -63,7 +63,12 @@ public class DependencyInjectionTestExecutionListener extends AbstractTestExecut
/**
* Returns {@code 2000}.
* Returns {@code 2000}, which ensures that the {@code ApplicationEventsTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener
* BeanOverrideTestExecutionListener} and just before the
* {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener
* DirtiesContextTestExecutionListener}.
*/
@Override
public final int getOrder() {

7
spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextBeforeModesTestExecutionListener.java

@ -55,7 +55,12 @@ import static org.springframework.test.annotation.DirtiesContext.MethodMode.BEFO @@ -55,7 +55,12 @@ import static org.springframework.test.annotation.DirtiesContext.MethodMode.BEFO
public class DirtiesContextBeforeModesTestExecutionListener extends AbstractDirtiesContextTestExecutionListener {
/**
* Returns {@code 1500}.
* Returns {@code 1500}, which ensures that the {@code DirtiesContextBeforeModesTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.web.ServletTestExecutionListener
* ServletTestExecutionListener} and just before the
* {@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener
* BeanOverrideTestExecutionListener}.
*/
@Override
public final int getOrder() {

7
spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java

@ -55,7 +55,12 @@ import static org.springframework.test.annotation.DirtiesContext.MethodMode.AFTE @@ -55,7 +55,12 @@ import static org.springframework.test.annotation.DirtiesContext.MethodMode.AFTE
public class DirtiesContextTestExecutionListener extends AbstractDirtiesContextTestExecutionListener {
/**
* Returns {@code 3000}.
* Returns {@code 3000}, which ensures that the {@code DirtiesContextTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.support.DependencyInjectionTestExecutionListener
* DependencyInjectionTestExecutionListener} and just before the
* {@link org.springframework.test.context.support.CommonCachesTestExecutionListener
* CommonCachesTestExecutionListener}.
*/
@Override
public final int getOrder() {

7
spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java

@ -177,7 +177,12 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis @@ -177,7 +177,12 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis
/**
* Returns {@code 4000}.
* Returns {@code 4000}, which ensures that the {@code TransactionalTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.support.CommonCachesTestExecutionListener
* CommonCachesTestExecutionListener} and just before the
* {@link org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener
* SqlScriptsTestExecutionListener}.
*/
@Override
public final int getOrder() {

5
spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java

@ -110,7 +110,10 @@ public class ServletTestExecutionListener extends AbstractTestExecutionListener @@ -110,7 +110,10 @@ public class ServletTestExecutionListener extends AbstractTestExecutionListener
/**
* Returns {@code 1000}.
* Returns {@code 1000}, which ensures that the {@code ServletTestExecutionListener}
* is ordered before the
* {@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener
* DirtiesContextBeforeModesTestExecutionListener}.
*/
@Override
public final int getOrder() {

Loading…
Cancel
Save