Commit 7e54629
tests(session): improve session table deletion polling and add flaky retries (#18097)
In `tests/system/small/test_bq_sessions.py`:
1. `test_bq_session_create_temp_table_clustered` tests that session
temporary tables are deleted after closing the session. Because BigQuery
cleans up `_SESSION` dataset resources asynchronously, during high CI
load this can take longer than 60 seconds, causing
`pytest.raises(NotFound)` to fail prematurely.
2. `test_bq_session_create_multi_temp_tables` creates 10 concurrent
tables across threads and can encounter transient DDL rate limiting or
network latency under parallel test execution (`pytest-xdist`).
### Changes
- Updated `test_bq_session_create_temp_table_clustered` to poll for
table deletion for up to 120s with 5s intervals and assert
`table_deleted`.
- Added `@pytest.mark.flaky(retries=2, delay=10)` to both session tests
to prevent transient CI test flakes.
Fixes #<545778300> 🦕
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent bc1d6dd commit 7e54629
1 file changed
Lines changed: 13 additions & 5 deletions
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
69 | 76 | | |
70 | 77 | | |
| 78 | + | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
| |||
0 commit comments