Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

tests.system.reader.test_reader: test_snapshot[v1] failed #151

@flaky-bot

Description

@flaky-bot

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: f1bc412
buildURL: Build Status, Sponge
status: failed

Test output
client_and_types = (, )
project_id = 'precise-truck-742'
table_with_data_ref = 'projects/precise-truck-742/datasets/bq_storage_system_tests_42335d05_507f_48e0_8c32_033823270111/tables/users'
bq_client = 
def test_snapshot(client_and_types, project_id, table_with_data_ref, bq_client):
    client, types = client_and_types
    before_new_data = dt.datetime.now(tz=dt.timezone.utc)

    # load additional data into the table
    new_data = [
        {"first_name": "NewGuyFoo", "last_name": "Smith", "age": 46},
        {"first_name": "NewGuyBar", "last_name": "Jones", "age": 30},
    ]

    destination = _to_bq_table_ref(table_with_data_ref)
    bq_client.load_table_from_json(new_data, destination).result()

    # read data using the timestamp before the additional data load

    read_session = types.ReadSession()
    read_session.table = table_with_data_ref
    read_session.table_modifiers.snapshot_time = before_new_data
    read_session.data_format = types.DataFormat.AVRO

    session = client.create_read_session(
        request={
            "parent": "projects/{}".format(project_id),
            "read_session": read_session,
            "max_stream_count": 1,
        }
    )
    stream = session.streams[0].name

    rows = list(client.read_rows(stream).rows(session))

    # verify that only the data before the timestamp was returned
  assert len(rows) == 5  # all initial records

E assert 0 == 5
E + where 0 = len([])

tests/system/reader/test_reader.py:212: AssertionError

Metadata

Metadata

Assignees

Labels

api: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions