diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb6690b..5d65016 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/tests/test_engine/test_db.py b/tests/test_engine/test_db.py index d6f1703..506d401 100644 --- a/tests/test_engine/test_db.py +++ b/tests/test_engine/test_db.py @@ -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: