Commit 92fc265
fix(tests): switch to asyncio_mode=strict to prevent kuzu segfault
The segfault was caused by pytest-asyncio creating background event loops
for all tests when asyncio_mode=auto. Kuzu's C++ library conflicts with
these background threads, causing segfaults during test execution.
Solution:
- Switch asyncio_mode from auto to strict in both pytest.ini files
- Explicitly mark async test files with pytest.mark.asyncio:
- tests/test_mcp_v2.py
- tests/test_mcp_tools.py
- tests/test_lancedb_e2e.py
This prevents pytest-asyncio from creating event loops for kuzu tests
while keeping asyncio working for tests that explicitly opt in.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent deadc75 commit 92fc265
5 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
0 commit comments