refactor(tests): use assert_alive() #15546

This commit is contained in:
Justin M. Keyes
2021-09-01 09:42:53 -07:00
committed by GitHub
parent 0603eba6e7
commit 6751d6254b
24 changed files with 55 additions and 41 deletions

View File

@@ -11,6 +11,7 @@ local meths = helpers.meths
local spawn, merge_args = helpers.spawn, helpers.merge_args
local set_session = helpers.set_session
local pcall_err = helpers.pcall_err
local assert_alive = helpers.assert_alive
describe('server -> client', function()
local cid
@@ -33,7 +34,7 @@ describe('server -> client', function()
call jobstop(ch1)
]])
eq(2, eval("1+1")) -- Still alive?
assert_alive()
end)
describe('simple call', function()
@@ -158,7 +159,7 @@ describe('server -> client', function()
-- do some busywork, so the first request will return
-- before this one
for _ = 1, 5 do
eq(2, eval("1+1"))
assert_alive()
end
eq(1, eval('rpcnotify('..cid..', "nested_done")'))
return 'done!'