From 31a68191e1d1b5fdae59cf55ca0687a796083111 Mon Sep 17 00:00:00 2001 From: saurtron Date: Mon, 23 Dec 2024 13:33:24 +0100 Subject: [PATCH] test_runner: Add 'timeout' parameter to SyncedRun. (#4057) --- luaui/Widgets/dbg_test_runner.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luaui/Widgets/dbg_test_runner.lua b/luaui/Widgets/dbg_test_runner.lua index 2c4bada6f2..033d8d1d0c 100644 --- a/luaui/Widgets/dbg_test_runner.lua +++ b/luaui/Widgets/dbg_test_runner.lua @@ -615,14 +615,14 @@ end SyncedProxy = createNestedProxy(Proxy.PREFIX.CALL) -SyncedRun = function(fn) +SyncedRun = function(fn, timeout) local serializedFn, returnID = rpc:serializeFunctionRun(fn, 3) returnState = { waitingForReturnID = returnID, success = nil, pendingValueOrError = nil, - timeoutExpireFrame = Spring.GetGameFrame() + config.returnTimeout, + timeoutExpireFrame = Spring.GetGameFrame() + (timeout or config.returnTimeout), } log(LOG.DEBUG, "[SyncedRun.send]")