Skip to content

Commit

Permalink
fix: add clear index to troublesome tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescalam committed Jan 10, 2025
1 parent 19169e7 commit 43c119e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/unit/test_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,14 @@ def check_index_populated():

check_index_populated()

# clear index
@retry(max_retries=RETRY_COUNT, delay=PINECONE_SLEEP)
def clear_index():
route_layer.index.index.delete(delete_all=True)
assert route_layer.index.get_utterances() == []

clear_index()

def test_query_and_classification(self, routes, index_cls, encoder_cls, router_cls):
encoder = encoder_cls()
index = init_index(index_cls, index_name=encoder.__class__.__name__)
Expand Down

0 comments on commit 43c119e

Please sign in to comment.