test(test_alangfuse.py): fix test to flush in order

This commit is contained in:
Krrish Dholakia 2024-06-20 10:20:43 -07:00
parent 411eb38304
commit 9704e1cde0
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View file

@ -60,3 +60,4 @@ litellm/proxy/_experimental/out/404/index.html
litellm/proxy/_experimental/out/model_hub/index.html
litellm/proxy/_experimental/out/onboarding/index.html
litellm/tests/log.txt
litellm/tests/langfuse.log

View file

@ -362,7 +362,7 @@ async def test_aaalangfuse_logging_metadata(langfuse_client):
print(response)
metadata["existing_trace_id"] = trace_id
langfuse_client.flush()
langfuse_client.flush() # make sure traces w/ generations are flushed in-order, prevents race condition of trace output being overwritten
await asyncio.sleep(10)
# Tests the metadata filtering and the override of the output to be the last generation