Skip to content

Commit

Permalink
Revise TestExecutionListener order values documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Feb 11, 2025
1 parent 128e900 commit 09086fc
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 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.
Expand Down Expand Up @@ -40,7 +40,7 @@ public class BeanOverrideTestExecutionListener extends AbstractTestExecutionList
* Returns {@code 1950}, which ensures that the {@code BeanOverrideTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener
* DirtiesContextBeforeModesTestExecutionListener} and just before the
* DirtiesContextBeforeModesTestExecutionListener} and before the
* {@link DependencyInjectionTestExecutionListener}.
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ public class MockitoResetTestExecutionListener extends AbstractTestExecutionList


/**
* Returns {@code Ordered.LOWEST_PRECEDENCE - 100}.
* Returns {@code Ordered.LOWEST_PRECEDENCE - 100}, which ensures that the
* {@code MockitoResetTestExecutionListener} is ordered after all standard
* {@code TestExecutionListener} implementations.
*/
@Override
public int getOrder() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2025 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.
Expand Down Expand Up @@ -64,9 +64,11 @@ public class ApplicationEventsTestExecutionListener extends AbstractTestExecutio
* 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
* DirtiesContextBeforeModesTestExecutionListener} and before the
* {@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener
* BeanOverrideTestExecutionListener}.
* BeanOverrideTestExecutionListener} and the
* {@link org.springframework.test.context.support.DependencyInjectionTestExecutionListener
* DependencyInjectionTestExecutionListener}.
*/
@Override
public final int getOrder() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2025 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.
Expand Down Expand Up @@ -101,7 +101,9 @@ public class EventPublishingTestExecutionListener extends AbstractTestExecutionL
* Returns {@code 10000}, which ensures that the {@code EventPublishingTestExecutionListener}
* is ordered after the
* {@link org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener
* SqlScriptsTestExecutionListener}.
* SqlScriptsTestExecutionListener} and before the
* {@link org.springframework.test.context.bean.override.mockito.MockitoResetTestExecutionListener
* MockitoResetTestExecutionListener}.
*/
@Override
public final int getOrder() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 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.
Expand Down Expand Up @@ -129,7 +129,7 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
* 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
* TransactionalTestExecutionListener} and before the
* {@link org.springframework.test.context.event.EventPublishingTestExecutionListener
* EventPublishingTestExecutionListener}.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 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.
Expand Down Expand Up @@ -107,10 +107,10 @@ public MicrometerObservationRegistryTestExecutionListener() {


/**
* Returns {@code 2500}, which ensures that the {@code MicrometerObservationRegistryTestExecutionListener}
* is ordered after the
* 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
* DependencyInjectionTestExecutionListener} and before the
* {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener
* DirtiesContextTestExecutionListener}.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 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.
Expand Down Expand Up @@ -38,8 +38,7 @@ public class CommonCachesTestExecutionListener extends AbstractTestExecutionList
/**
* 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 DirtiesContextTestExecutionListener DirtiesContextTestExecutionListener} and before the
* {@link org.springframework.test.context.transaction.TransactionalTestExecutionListener
* TransactionalTestExecutionListener}.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 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.
Expand Down Expand Up @@ -63,12 +63,14 @@ public class DependencyInjectionTestExecutionListener extends AbstractTestExecut


/**
* Returns {@code 2000}, which ensures that the {@code ApplicationEventsTestExecutionListener}
* Returns {@code 2000}, which ensures that the {@code DependencyInjectionTestExecutionListener}
* 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}.
* {@link DirtiesContextBeforeModesTestExecutionListener DirtiesContextBeforeModesTestExecutionListener}
* and the {@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener
* BeanOverrideTestExecutionListener} and before the
* {@link org.springframework.test.context.observation.MicrometerObservationRegistryTestExecutionListener
* MicrometerObservationRegistryTestExecutionListener} and the
* {@link DirtiesContextTestExecutionListener DirtiesContextTestExecutionListener}.
*/
@Override
public final int getOrder() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2025 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.
Expand Down Expand Up @@ -58,7 +58,9 @@ public class DirtiesContextBeforeModesTestExecutionListener extends AbstractDirt
* 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
* ServletTestExecutionListener} and before the
* {@link org.springframework.test.context.event.ApplicationEventsTestExecutionListener
* ApplicationEventsTestExecutionListener} and the
* {@link org.springframework.test.context.bean.override.BeanOverrideTestExecutionListener
* BeanOverrideTestExecutionListener}.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2025 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.
Expand Down Expand Up @@ -57,10 +57,8 @@ public class DirtiesContextTestExecutionListener extends AbstractDirtiesContextT
/**
* 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}.
* {@link DependencyInjectionTestExecutionListener DependencyInjectionTestExecutionListener}
* and before the {@link CommonCachesTestExecutionListener CommonCachesTestExecutionListener}.
*/
@Override
public final int getOrder() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2025 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.
Expand Down Expand Up @@ -180,7 +180,7 @@ private TransactionAttribute findTransactionAttributeInEnclosingClassHierarchy(C
* 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
* CommonCachesTestExecutionListener} and before the
* {@link org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener
* SqlScriptsTestExecutionListener}.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2025 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.
Expand Down

0 comments on commit 09086fc

Please sign in to comment.