mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-05 01:02:37 +00:00
fix: narrow ValueError catch in _create_table and increase test timeout
This commit is contained in:
@@ -210,9 +210,10 @@ class LanceDBStorage:
|
||||
]
|
||||
try:
|
||||
table = self._db.create_table(self._table_name, placeholder)
|
||||
table.delete("id = '__schema_placeholder__'")
|
||||
except ValueError:
|
||||
table = self._db.open_table(self._table_name)
|
||||
else:
|
||||
table.delete("id = '__schema_placeholder__'")
|
||||
return table
|
||||
|
||||
def _ensure_scope_index(self) -> None:
|
||||
|
||||
@@ -13,7 +13,6 @@ import multiprocessing
|
||||
import os
|
||||
import sqlite3
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -166,6 +165,7 @@ def _run_workers(target, args_fn, n_workers=N_WORKERS, timeout=120):
|
||||
return successes, errors
|
||||
|
||||
|
||||
@pytest.mark.timeout(120)
|
||||
class TestConcurrentLanceDB:
|
||||
"""Concurrent multi-process writes to LanceDB."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user