Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Nov 29, 2019
1 parent c77c7b0 commit ecd6601
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/session_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ local function test_session(description, session_factory, session_destroy)
session_destroy()
else
session:close()
assert.are.equal(0, session.child_exit)
assert.are.equal(0, session.child_signal)
end
closed = true
end)
Expand All @@ -179,6 +181,8 @@ test_session(string.format("Session using SocketStream [%s]", socket_file), func
return socket_session
end, function ()
child_session:close()
assert.are.equal(0, child_session.child_exit)
assert.are.equal(0, child_session.child_signal)
socket_session:close()
-- clean up leftovers if something goes wrong
local fd = io.open(socket_file)
Expand Down Expand Up @@ -218,6 +222,8 @@ test_session("Session using TcpStream", function ()
return tcp_session
end, function ()
child_session:close()
assert.are.equal(0, child_session.child_exit)
assert.are.equal(0, child_session.child_signal)
tcp_session:close()
end)

Expand Down

0 comments on commit ecd6601

Please sign in to comment.