This is an automated email from the ASF dual-hosted git repository.
terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new da096439aa1 Refactor TransactionBaseE2EIT (#39216)
da096439aa1 is described below
commit da096439aa116e5f15cebee32a01671ccb3e662c
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Jul 23 00:27:14 2026 +0800
Refactor TransactionBaseE2EIT (#39216)
---
.../transaction/engine/base/TransactionBaseE2EIT.java | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/operation/transaction/engine/base/TransactionBaseE2EIT.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/operation/transaction/engine/base/TransactionBaseE2EIT.java
index c9b3a3bbe83..a46d27593f4 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/operation/transaction/engine/base/TransactionBaseE2EIT.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/operation/transaction/engine/base/TransactionBaseE2EIT.java
@@ -96,13 +96,10 @@ public abstract class TransactionBaseE2EIT {
return
JAXB.unmarshal(Objects.requireNonNull(Thread.currentThread().getContextClassLoader().getResource("env/common/command.xml")),
CommonSQLCommand.class);
}
- @ParameterizedTest(name = "{0}")
+ @ParameterizedTest(name = "{0}", allowZeroInvocations = true)
@EnabledIf("isEnabled")
@ArgumentsSource(TestCaseArgumentsProvider.class)
void assertTransaction(final TransactionTestParameter testParam) throws
SQLException {
- if (null == testParam) {
- return;
- }
try (TransactionContainerComposer containerComposer = new
TransactionContainerComposer(testParam)) {
try {
callTestCases(testParam, containerComposer);
@@ -345,13 +342,7 @@ public abstract class TransactionBaseE2EIT {
}
private Collection<TransactionTestParameter>
getTransactionTestParameters(final Class<? extends TransactionBaseE2EIT>
testCaseClass) {
- TransactionTestCaseRegistry registry =
TRANSACTION_ENV.getTransactionTestCaseRegistryMap().get(testCaseClass.getName());
- Collection<TransactionTestParameter> result =
getTestParameters(registry);
- // TODO zhangcheng make sure the test cases should not empty
- if (result.isEmpty()) {
- result.add(null);
- }
- return result;
+ return
getTestParameters(TRANSACTION_ENV.getTransactionTestCaseRegistryMap().get(testCaseClass.getName()));
}
private Collection<TransactionTestParameter> getTestParameters(final
TransactionTestCaseRegistry registry) {