From da901b01d80923953fee6bd3d5687cd35822eb8d Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Tue, 17 Sep 2024 10:52:39 -0700 Subject: [PATCH] Fix flaky test --- libs/langgraph/tests/test_pregel_async.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/langgraph/tests/test_pregel_async.py b/libs/langgraph/tests/test_pregel_async.py index a3a1510c2..36af4935a 100644 --- a/libs/langgraph/tests/test_pregel_async.py +++ b/libs/langgraph/tests/test_pregel_async.py @@ -7011,6 +7011,9 @@ async def test_stream_subgraphs_during_execution(checkpointer_name: str) -> None config = {"configurable": {"thread_id": "2"}} async for c in app.astream({"my_key": ""}, config, subgraphs=True): chunks.append((round(perf_counter() - start, 1), c)) + for idx in range(len(chunks)): + elapsed, c = chunks[idx] + chunks[idx] = (round(elapsed - chunks[0][0], 1), c) assert chunks == [ # arrives before "inner" finishes