Skip to content

Commit 3927ece

Browse files
committed
tests: fix fiber status detection
1 parent 00cac3b commit 3927ece

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

t/020-fifottl.t

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ test:test('read_only test', function(test)
217217
local rc = queue_state.poll_waiting(10)
218218
test:ok(rc, "queue state changed to waiting")
219219
fiber.sleep(0.11)
220-
local _, err = pcall(ttl_fiber.info, ttl_fiber)
221-
test:is(err, "the fiber is dead",
220+
test:is(ttl_fiber:status(), 'dead',
222221
"check that background fiber is canceled")
223222
test:isnil(tube.raw.fiber,
224223
"check that background fiber object is cleaned")

t/040-utubettl.t

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ test:test('read_only test', function(test)
229229
local rc = queue_state.poll_waiting(10)
230230
test:ok(rc, "queue state changed to waiting")
231231
fiber.sleep(0.11)
232-
local _, err = pcall(ttl_fiber.info, ttl_fiber)
233-
test:is(err, "the fiber is dead",
232+
test:is(ttl_fiber:status(), 'dead',
234233
"check that background fiber is canceled")
235234
test:isnil(tube.raw.fiber,
236235
"check that background fiber object is cleaned")

0 commit comments

Comments
 (0)