cc-libs/tests/harness/timeout-10s.lua
2026-06-08 05:37:49 +02:00

15 lines
555 B
Lua

-- Harness fixture (NOT auto-discovered: lives under tests/harness/).
-- Sleeps 10s with the libtest timeout bypassed (--no-timeout), proving the
-- shell watchdog is still the backstop. Driven by `just test-timeout-10s`.
local createLibTest = require('/apis/libtest');
local testlib = createLibTest({ ... });
testlib.test('sleeps past the shell watchdog', function()
testlib.log('about to sleep 10s with the libtest timeout disabled');
sleep(10);
testlib.assertTrue(true); -- never reached: shell watchdog kills the process
end);
testlib.run();