Actually make bc timeout

Signed-off-by: Rahix <rahix@rahix.de>
dev
rahix 7 years ago
parent 9f10348b58
commit b9c3674755

@ -171,7 +171,7 @@ function BaseControl:finalize(waits, timeout)
if timeout ~= nil then
timeout_remaining = timeout - (computer.uptime() - tstart)
if timeout_remaining <= 0 then
break
error("timeout")
end
end
-- Wait until the next register arrives

@ -50,5 +50,7 @@ end
function test_timeout_finalize()
local bc1 = BaseControl:new()
local addr1 = network.get_scene()
assert_error_match("timeout", function()
bc1:finalize({"to_final1"}, 0.1)
end)
end

Loading…
Cancel
Save