Commit 2fe971e
authored
Fix race condition in integration test cleanup (#513)
## Problem
I noticed that tests were failing for the python 3.13 build of
`tests/integration/data_grpc_futures` tests after merging PR #510 to
main.
## Solution
Context:
- When tests are run on a PR branch, they only execute on python 3.9.
- When tests they run on main, tests run for both python 3.9 and 3.13.
What I observed:
- In this case, the python 3.13 build of newly added tests
`tests/integration/data_grpc_futures` was consistently failing with
"Unauthorized" errors
- Despite the confusing error message from the API, this "Unauthorized"
response was being returned when making calls for an index that no
longer exists.
- Why did the index no longer exist? Because the python 3.9 build of the
same tests was completing first and nuking the index before the 3.13
python build completes.
- Why would the 3.9 tests delete an index being used by the 3.13 tests?
- A test helper was assigning a deterministic name for the index that
was the same for both builds.
Solution:
- Revert back to a randomized name strategy for indexes. Need to rethink
deterministic names later before we can use something like VCR to
playback recorded API calls in testing.
- Reenable 3.13 tests on PR branches for now so we can see that this
change takes care of the problem observed on merge
## Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] Infrastructure change (CI configs, etc)
## Test Plan
Should see all tests passing even when 3.9 and 3.13 tests are run
together on PR push.1 parent 86c381c commit 2fe971e
File tree
3 files changed
+12
-4
lines changed- .github/workflows
- tests/integration/helpers
3 files changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments