15 lines
562 B
Lua
15 lines
562 B
Lua
-- Harness fixture (NOT auto-discovered: lives under tests/harness/).
|
|
-- Sleeps past the 3s libtest default timeout but under the 7s shell watchdog,
|
|
-- proving the libtest layer cancels the case first. Driven by `just test-timeout-5s`.
|
|
local createLibTest = require('/apis/libtest');
|
|
|
|
local testlib = createLibTest({ ... });
|
|
|
|
testlib.test('sleeps past the libtest timeout', function()
|
|
testlib.log('about to sleep 5s; libtest should cancel this case at 3s');
|
|
sleep(5);
|
|
testlib.assertTrue(true); -- never reached: libtest cancels first
|
|
end);
|
|
|
|
testlib.run();
|