From 9ca2d8e5c5b765316f677537d397f37c053b082c Mon Sep 17 00:00:00 2001 From: yucheng Date: Wed, 23 Sep 2026 12:04:15 +0000 Subject: [PATCH] test(langfuse_otel): gate the slow sink reply instead of sleeping Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../observability/test_langfuse_otel_metadata.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/observability/test_langfuse_otel_metadata.py b/tests/integration/observability/test_langfuse_otel_metadata.py index 058b4361937..29f0f7d25ba 100644 --- a/tests/integration/observability/test_langfuse_otel_metadata.py +++ b/tests/integration/observability/test_langfuse_otel_metadata.py @@ -2,7 +2,6 @@ import base64 import binascii import json import threading -import time import uuid from collections.abc import Callable, Iterator, Mapping from concurrent.futures import ThreadPoolExecutor, wait @@ -980,8 +979,9 @@ def test_langfuse_otel_slow_sink_does_not_deadlock_exports(gateway: Gateway, tmp marker: Final = "lf-chaos-slow-" + uuid.uuid4().hex def sink_reply(request: Request) -> Reply: - time.sleep(2) - return Reply() + gate: Final = threading.Event() + threading.Timer(2, gate.set).start() + return Reply(chunks=(b"{}",), gate_after_first=gate) with ( _langfuse_rig(gateway, tmp_path, {}, marker, sink_reply=sink_reply) as rig,