chore: telemetry test (#3405)

# What does this PR do?
- removed fixed-duration sleeps

## Test Plan
This commit is contained in:
ehhuang 2025-09-10 13:19:36 -07:00 committed by GitHub
parent d4e45cd5f1
commit d2f88a10fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 17 deletions

View file

@ -42,14 +42,11 @@ def setup_telemetry_data(llama_stack_client, text_model_id):
traces = llama_stack_client.telemetry.query_traces(limit=10)
if len(traces) >= 4:
break
time.sleep(1)
time.sleep(0.1)
if len(traces) < 4:
pytest.fail(f"Failed to create sufficient telemetry data after 30s. Got {len(traces)} traces.")
# Wait for 5 seconds to ensure traces has completed logging
time.sleep(5)
yield