Skip to content

tests(streaming): use UTC timezone for start_timestamp and improve flaky retry delay - #18110

Open
shuoweil wants to merge 1 commit into
mainfrom
shuowei-fix-streaming-tests
Open

tests(streaming): use UTC timezone for start_timestamp and improve flaky retry delay#18110
shuoweil wants to merge 1 commit into
mainfrom
shuowei-fix-streaming-tests

Conversation

@shuoweil

Copy link
Copy Markdown
Contributor

In tests/system/large/streaming/test_bigtable.py and tests/system/large/streaming/test_pubsub.py, continuous streaming queries are launched from BigQuery to Bigtable and Pub/Sub sinks.

  1. start_timestamp was initialized with naive local datetime.now() - timedelta(days=1), which could cause timestamp offset mismatches across different CI runner timezones.
  2. The retry delay was 10s, which is often insufficient for BigQuery continuous query slot capacity provisioning during retries under load.

Changes

  • Updated start_timestamp to explicit UTC timezone (datetime.now(timezone.utc) - timedelta(days=1)).
  • Increased @pytest.mark.flaky retry delay from 10s to 30s.

Fixes #<545715930> 🦕

@shuoweil
shuoweil requested a review from sycai August 13, 2026 19:19
@shuoweil shuoweil self-assigned this Aug 13, 2026
@shuoweil
shuoweil requested a review from a team as a code owner August 13, 2026 19:19
@shuoweil shuoweil added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 13, 2026
@shuoweil
shuoweil requested a review from a team as a code owner August 13, 2026 19:19

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the streaming tests for BigTable and PubSub by switching from naive local datetimes to timezone-aware UTC datetimes using datetime.now(timezone.utc). Additionally, it increases the retry delay for flaky tests from 10 seconds to 30 seconds to improve test stability. There are no review comments, and I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant