Revise "Introduce class-level execution phases for @Sql"
This commit revises the previous commit as follows.
- Remove hasTestMethod() from TestContext and instead introduce a new
variant of createDelegatingTransactionAttribute() in
TestContextTransactionUtils which accepts a boolean
`includeMethodName` flag.
- Add missing @TestMethodOrder declaration to
AfterTestClassSqlScriptsTests to ensure that the test methods are
always executed in the required order.
- Polish Javadoc and add missing @since tags.
Closes gh-27285
@ -138,20 +138,22 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@@ -138,20 +138,22 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@ -189,11 +191,12 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@@ -189,11 +191,12 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@ -286,7 +289,7 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@@ -286,7 +289,7 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
()->"%s cannot be used on methods".formatted(sql.executionPhase()));
()->"@SQL execution phase %s cannot be used on methods".formatted(sql.executionPhase()));
if(executionPhase!=sql.executionPhase()){
return;
@ -302,10 +305,8 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@@ -302,10 +305,8 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@ -357,7 +358,7 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@@ -357,7 +358,7 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@ -458,7 +459,8 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@@ -458,7 +459,8 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
@ -167,11 +166,6 @@ public class DefaultTestContext implements TestContext {
@@ -167,11 +166,6 @@ public class DefaultTestContext implements TestContext {