Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sicheng Pan committed Oct 11, 2024
1 parent 99cddb0 commit 8feb481
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions chromadb/test/property/test_persist.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import chromadb
from chromadb.api import ClientAPI, ServerAPI
from chromadb.config import Settings, System
from chromadb.segment import SegmentManager, VectorReader
from chromadb.segment import SegmentManager
from chromadb.segment.impl.vector.local_hnsw import LocalHnswSegment
import chromadb.test.property.strategies as strategies
import chromadb.test.property.invariants as invariants
from chromadb.test.property.test_embeddings import (
Expand Down Expand Up @@ -142,7 +143,7 @@ def test_sync_threshold(settings: Settings) -> None:
)

manager = system.instance(SegmentManager)
segment = manager.get_segment(collection.id, VectorReader)
segment = manager.get_segment(collection.id, LocalHnswSegment)

def get_index_last_modified_at() -> float:
# Time resolution on Windows can be up to 10ms
Expand Down
5 changes: 3 additions & 2 deletions chromadb/test/segment/test_vector.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from typing import Generator, List, Callable, Iterator, Type, cast
from typing import Generator, List, Callable, Iterator, Type, cast, Union
from chromadb.config import System, Settings
from chromadb.test.conftest import ProducerFn
from chromadb.types import (
Expand All @@ -14,7 +14,6 @@
Vector,
)
from chromadb.ingest import Producer
from chromadb.segment import VectorReader
import uuid
import time

Expand All @@ -34,6 +33,8 @@
import shutil
import numpy as np

VectorReader = Union[LocalHnswSegment, PersistentLocalHnswSegment]


def sqlite() -> Generator[System, None, None]:
"""Fixture generator for sqlite DB"""
Expand Down

0 comments on commit 8feb481

Please sign in to comment.