Skip to content

test: unflake ITDmlReturningTest #3695

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

Merged
merged 1 commit into from
Mar 18, 2025
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 @@ -272,6 +272,8 @@ private List<Struct> executeQuery(long expectedCount, String stmt) {
List<Struct> rows = new ArrayList<>();
final TransactionCallable<Void> callable =
transaction -> {
// Make sure we start with an empty list if the transaction is aborted and retried.
rows.clear();
ResultSet resultSet = transaction.executeQuery(Statement.of(stmt));
// resultSet.next() returns false, when no more row exists.
// So, number of times resultSet.next() returns true, is the number of rows
Expand Down Expand Up @@ -335,6 +337,7 @@ private List<Struct> executeQueryAsync(long expectedCount, String stmt) {
List<Struct> rows = new ArrayList<>();
final TransactionCallable<Void> callable =
transaction -> {
rows.clear();
AsyncResultSet rs = transaction.executeQueryAsync(Statement.of(stmt));
rs.setCallback(
Executors.newSingleThreadExecutor(),
Expand Down
Loading