Skip to content

Commit 870cfb3

Browse files
fix
1 parent 64f8562 commit 870cfb3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

python/tests/integration/memory/memory_stores/test_azure_cog_search_memory_store.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,19 @@ async def test_record_not_found():
9797
embedding=np.array([0.2, 0.1, 0.2, 0.7]),
9898
)
9999
id = await memory_store.upsert(collection, rec)
100-
finally:
101-
await memory_store.delete_collection(collection)
102-
103-
try:
100+
await asyncio.sleep(1)
104101
await memory_store.remove(collection, id)
105102
await asyncio.sleep(1)
106103

107104
# KeyError exception should occur
108105
await memory_store.get(collection, id)
109106

110-
# Clean up and fail
111-
await memory_store.delete_collection(collection)
107+
# Fail when no exception is raised
112108
assert False
113109
except MemoryConnectorResourceNotFound:
114110
pass
111+
finally:
112+
await memory_store.delete_collection(collection)
115113

116114

117115
async def test_search():

0 commit comments

Comments
 (0)