Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
matrix:
include:
- os: macos-13
- os: macos-14
target: x86_64-apple-darwin
- os: macos-14
target: aarch64-apple-darwin
Expand Down
10 changes: 7 additions & 3 deletions tests/test_engine/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,18 @@ def test_insert_and_get_upload_job(self, db: IndexDB) -> None:
assert jobs[0]["job_id"] == "job1"
assert jobs[0]["backend_name"] == "s3"

def test_concurrent_reads(self, db: IndexDB) -> None:
"""WAL mode allows concurrent reads."""
def test_concurrent_reads(self, db: IndexDB, tmp_path: Path) -> None:
"""WAL mode allows concurrent reads from separate connections."""
db.insert_capture("a", "/tmp/a", "2026-03-01T10:00:00Z")
db_path = tmp_path / "index.db"
results = []

def read_cap():
cap = db.get_capture("a")
reader = IndexDB(db_path)
reader.initialize()
cap = reader.get_capture("a")
results.append(cap is not None)
reader.close()

threads = [threading.Thread(target=read_cap) for _ in range(5)]
for t in threads:
Expand Down