Skip to content

Commit 1b4741b

Browse files
HumanBean17claude
andcommitted
fix(tests): gate test_search_lancedb_capability behind RUN_HEAVY
These tests call run_search() which triggers _connect_lancedb() -> import lancedb -> LanceDBBackgroundEventLoop daemon thread. On CI (Ubuntu) the thread race-conditions with Kuzu C++ queries causing a segfault. On macOS the race didn't manifest due to timing differences. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 881aa3b commit 1b4741b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/test_search_lancedb_capability.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
"""`run_search` with `capability=` — exercises Lance `array_has` + vector path (no CocoIndex)."""
22
from __future__ import annotations
33

4+
import os
45
import uuid
56

7+
import pytest
8+
69
from sentence_transformers import SentenceTransformer
710

811
from ast_java import ONTOLOGY_VERSION
912
from index_common import SBERT_MODEL
1013
from search_lancedb import TABLES, _query_vector, run_search
1114

15+
pytestmark = pytest.mark.skipif(
16+
os.environ.get("JAVA_CODEBASE_RAG_RUN_HEAVY", "").strip() != "1",
17+
reason="imports lancedb at runtime (spawns background thread that causes Kuzu segfaults)",
18+
)
19+
1220

1321
def _one_java_row_built_for_capability_filter(
1422
*,

0 commit comments

Comments
 (0)