Skip to content

Commit

Permalink
Adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
javalikescript committed Nov 7, 2024
1 parent bde4fbc commit 2615154
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions tests/test-async.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ return require('lib/tap')(function (test)
assert(type(asy)=='userdata')
assert(uv.async_send(asy,'a',true,250)==0)
uv.sleep(10)
uv.run()
end, async)
uv.sleep(10)
uv.run()
t:join()
end)
Expand Down
7 changes: 5 additions & 2 deletions tests/test-thread.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,14 @@ return require('lib/tap')(function (test)
args[i] = i
end
local unpack = unpack or table.unpack
uv.new_thread(function(...)
local t = uv.new_thread(function(...)
local arg = {...}
assert(#arg == 9)
arg[1]:send(#arg)
end, unpack(args)):join()
require('luv').sleep(10)
end, unpack(args))
uv.run()
t:join()
assert(#args==10)
end)

Expand Down

0 comments on commit 2615154

Please sign in to comment.