feat: Raise exception in tests when blocking code is called in event loop (#4293)
Raise exception in tests when blocking code is called in event loop
This commit is contained in:
parent
df22924b0e
commit
14b3117d6b
13 changed files with 596 additions and 46 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import asyncio
|
||||
|
||||
from langflow.processing.process import process_tweaks
|
||||
from langflow.services.deps import get_session_service
|
||||
|
||||
|
|
@ -263,7 +265,7 @@ def test_tweak_not_in_template():
|
|||
|
||||
async def test_load_langchain_object_with_cached_session(basic_graph_data):
|
||||
# Provide a non-existent session_id
|
||||
session_service = get_session_service()
|
||||
session_service = await asyncio.to_thread(get_session_service)
|
||||
session_id1 = "non-existent-session-id"
|
||||
graph1, artifacts1 = await session_service.load_session(session_id1, basic_graph_data)
|
||||
# Use the new session_id to get the langchain_object again
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue