Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix tests - Wait for the process to end
Jakub Novak724c005bd1dd
diff --git a/packages/js-sdk/test/process.test.mjs b/packages/js-sdk/test/process.test.mjsindex 899211571..1a9761d8e 100644--- a/packages/js-sdk/test/process.test.mjs+++ b/packages/js-sdk/test/process.test.mjs@@ -46,11 +46,11 @@ test('process send stdin', async () => {const session = await Session.create({ id: "Nodejs", apiKey: E2B_API_KEY })const process = await session.process.start({- cmd: 'while IFS= read -r line; do echo "$line"; sleep 1; done',+ cmd: 'read -r line; echo "$line"',rootdir: "/code"})await process.sendStdin("ping\n")- await process.kill()+ await processexpect(process.output.stdout).toEqual("ping")// TODO: Parity with Python SDKdiff --git a/packages/python-sdk/tests/test_process.py b/packages/python-sdk/tests/test_process.pyindex 3b9c8f104..9174c74ba 100644--- a/packages/python-sdk/tests/test_process.py+++ b/packages/python-sdk/tests/test_process.py@@ -54,7 +54,7 @@ async def test_process_send_stdin():rootdir="/code",)await proc.send_stdin("ping\n")- await proc.kill()+ await procassert proc.output.stdout == "ping"