Skip to content

Commit

Permalink
Trying fix with sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
Vits-99 committed Jan 23, 2025
1 parent 230b323 commit b470d73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/unit/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ def test_auto_sync_local(
index=pinecone_index,
auto_sync="local",
)
time.sleep(PINECONE_SLEEP)

@retry(max_retries=RETRY_COUNT, delay=PINECONE_SLEEP)
def check_sync():
Expand Down Expand Up @@ -449,6 +450,7 @@ def test_auto_sync_remote(
index=pinecone_index,
auto_sync="remote",
)
time.sleep(PINECONE_SLEEP)

@retry(max_retries=RETRY_COUNT, delay=PINECONE_SLEEP)
def check_sync():
Expand Down Expand Up @@ -481,6 +483,7 @@ def test_auto_sync_merge_force_local(
index=pinecone_index,
auto_sync="merge-force-local",
)
time.sleep(PINECONE_SLEEP)

@retry(max_retries=RETRY_COUNT, delay=PINECONE_SLEEP)
def check_sync():
Expand Down Expand Up @@ -891,13 +894,14 @@ async def test_auto_sync_merge_force_local(
index=pinecone_index,
auto_sync="local",
)
await asyncio.sleep(PINECONE_SLEEP * 2) # allow for index to be populated
await asyncio.sleep(PINECONE_SLEEP) # allow for index to be populated
route_layer = router_cls(
encoder=openai_encoder,
routes=routes_2,
index=pinecone_index,
auto_sync="merge-force-local",
)
await asyncio.sleep(PINECONE_SLEEP)

@async_retry(max_retries=RETRY_COUNT, delay=PINECONE_SLEEP)
async def check_sync():
Expand Down Expand Up @@ -972,6 +976,7 @@ async def populate_index():
index=pinecone_index,
auto_sync="merge-force-remote",
)
await asyncio.sleep(PINECONE_SLEEP)

@async_retry(max_retries=RETRY_COUNT, delay=PINECONE_SLEEP)
async def check_sync():
Expand Down Expand Up @@ -1046,6 +1051,7 @@ async def test_auto_sync_merge(
index=pinecone_index,
auto_sync="merge",
)
await asyncio.sleep(PINECONE_SLEEP)

@async_retry(max_retries=RETRY_COUNT, delay=PINECONE_SLEEP)
async def check_sync():
Expand Down

0 comments on commit b470d73

Please sign in to comment.