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

fix: Due to upstream change in dataset, updates expected results #1761

Merged
merged 2 commits into from
Jan 5, 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
11 changes: 5 additions & 6 deletions tests/system/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1781,19 +1781,13 @@ def test_dbapi_fetch_w_bqstorage_client_large_result_set(self):
)

result_rows = [cursor.fetchone(), cursor.fetchone(), cursor.fetchone()]

field_name = operator.itemgetter(0)
fetched_data = [sorted(row.items(), key=field_name) for row in result_rows]
# Since DB API is not thread safe, only a single result stream should be
# requested by the BQ storage client, meaning that results should arrive
# in the sorted order.

expected_data = [
[
("by", "pg"),
("id", 1),
("timestamp", datetime.datetime(2006, 10, 9, 18, 21, 51, tzinfo=UTC)),
],
[
("by", "phyllis"),
("id", 2),
Expand All @@ -1804,6 +1798,11 @@ def test_dbapi_fetch_w_bqstorage_client_large_result_set(self):
("id", 3),
("timestamp", datetime.datetime(2006, 10, 9, 18, 40, 33, tzinfo=UTC)),
],
[
("by", "onebeerdave"),
("id", 4),
("timestamp", datetime.datetime(2006, 10, 9, 18, 47, 42, tzinfo=UTC)),
],
]

self.assertEqual(fetched_data, expected_data)
Expand Down