Skip to content

Commit e99ce45

Browse files
nshyLeonidVas
authored andcommitted
test: dont os.exit() in session disconnect trigger
We are going to make Tarantool shutdown graceful. Particularly for iproto graceful shutdown we wait while all connections are finished. On connection disconnect session disconnect triggers are invoked. If trigger hangs then graceful shutdown will hang too. And os.exit() do hang, it sleeps forever. So 110-disconnect-trigger-check.t test now hangs with iproto graceful shutdown patch. Making os.exit() from disconnect trigger does not seem as a product case. So let's just change the test not to use os.exit(). Required for full-ci pass of tarantool/tarantool#9457
1 parent f900aeb commit e99ce45

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

t/110-disconnect-trigger-check.t

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test:plan(2)
1616
-- Verify that _queue_taken space is empty.
1717
local function check_result()
1818
if tube == nil then
19-
os.exit(1)
19+
return
2020
end
2121

2222
-- tube:drop() is most simple way to check that _queue_taken
@@ -26,7 +26,6 @@ local function check_result()
2626
test:is(res, true, 'tube:drop() result is true')
2727

2828
tnt.finish()
29-
os.exit(test:check() and 0 or 1)
3029
end
3130

3231
-- Yield in queue's on_disconnect trigger (which handles a client
@@ -92,7 +91,7 @@ local function test_lost_session_id_after_yield()
9291
-- session' error in the _on_consumer_disconnect and so the
9392
-- second on_disconnect trigger (check_result) will not be
9493
-- fired.
95-
os.exit(1)
94+
os.exit(test:check() and 0 or 1)
9695
end
9796

9897
test_lost_session_id_after_yield()

0 commit comments

Comments
 (0)