Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add skip execute query method in general dql E2E #34138

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ private void assertExecuteQuery(final AssertionTestParameter testParam, final E2

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()) {
Expand All @@ -76,6 +75,11 @@ private void assertExecuteQueryWithXmlExpected(final AssertionTestParameter test
}
}

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();
Expand Down Expand Up @@ -161,7 +165,7 @@ private void assertExecute(final AssertionTestParameter testParam, final E2ETest

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()) {
Expand All @@ -171,6 +175,10 @@ private void assertExecuteWithXmlExpected(final AssertionTestParameter testParam
}
}

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();
Expand Down
Loading