This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 fc693479b7e Add skip execute query method in general dql E2E (#34138)
fc693479b7e is described below
commit fc693479b7ed02d1bc0f21157e2657bf7a6a0445
Author: ZhangCheng <[email protected]>
AuthorDate: Tue Dec 24 17:28:25 2024 +0800
Add skip execute query method in general dql E2E (#34138)
---
.../test/e2e/engine/type/dql/GeneralDQLE2EIT.java | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
index 3fb3f146b52..9379586c32f 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
@@ -65,8 +65,7 @@ class GeneralDQLE2EIT extends BaseDQLE2EIT {
private void assertExecuteQueryWithXmlExpected(final
AssertionTestParameter testParam, final E2ETestContext context) throws
SQLException {
// TODO Fix jdbc adapter and empty_storage_units proxy adapter
- if ("jdbc".equals(testParam.getAdapter()) &&
!"empty_storage_units".equalsIgnoreCase(testParam.getScenario())
- || "proxy".equals(testParam.getAdapter()) &&
"empty_storage_units".equalsIgnoreCase(testParam.getScenario())) {
+ if (isNeedSkipExecuteQueryWithXmlExcepted(testParam)) {
return;
}
if (SQLExecuteType.LITERAL == context.getSqlExecuteType()) {
@@ -76,6 +75,11 @@ class GeneralDQLE2EIT extends BaseDQLE2EIT {
}
}
+ private boolean isNeedSkipExecuteQueryWithXmlExcepted(final
AssertionTestParameter testParam) {
+ return "jdbc".equals(testParam.getAdapter()) &&
!"empty_storage_units".equalsIgnoreCase(testParam.getScenario())
+ || "proxy".equals(testParam.getAdapter()) &&
"empty_storage_units".equalsIgnoreCase(testParam.getScenario());
+ }
+
private void assertQueryForStatementWithXmlExpected(final E2ETestContext
context) throws SQLException {
try (
Connection connection =
getEnvironmentEngine().getTargetDataSource().getConnection();
@@ -161,7 +165,7 @@ class GeneralDQLE2EIT extends BaseDQLE2EIT {
private void assertExecuteWithXmlExpected(final AssertionTestParameter
testParam, final E2ETestContext context) throws SQLException {
// TODO Fix jdbc adapter
- if ("jdbc".equals(testParam.getAdapter())) {
+ if (isNeedSkipExecuteWithXmlExcepted(testParam)) {
return;
}
if (SQLExecuteType.LITERAL == context.getSqlExecuteType()) {
@@ -171,6 +175,10 @@ class GeneralDQLE2EIT extends BaseDQLE2EIT {
}
}
+ private boolean isNeedSkipExecuteWithXmlExcepted(final
AssertionTestParameter testParam) {
+ return "jdbc".equals(testParam.getAdapter());
+ }
+
private void assertExecuteForStatementWithXmlExpected(final E2ETestContext
context) throws SQLException {
try (
Connection connection =
getEnvironmentEngine().getTargetDataSource().getConnection();