Skip to content

Commit

Permalink
tests(deps) update busted to 2.0rc13 and remove global patch
Browse files Browse the repository at this point in the history
After release rc13 the ffi patch was incorporated in Busted, hence
no more need to carry it with Kong itself.

See lunarmodules/busted#555
  • Loading branch information
Tieske committed Oct 29, 2018
1 parent 8ad12f0 commit de0125a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OS := $(shell uname)

DEV_ROCKS = "busted 2.0.rc12" "luacheck 0.20.0" "lua-llthreads2 0.1.5"
DEV_ROCKS = "busted 2.0.rc13" "luacheck 0.20.0" "lua-llthreads2 0.1.5"
WIN_SCRIPTS = "bin/busted" "bin/kong"
BUSTED_ARGS ?= -v
TEST_CMD ?= bin/busted $(BUSTED_ARGS)
Expand Down
27 changes: 1 addition & 26 deletions kong/globalpatches.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,6 @@ return function(options)



do -- deal with ffi re-loading issues

if options.rbusted then
-- pre-load the ffi module, such that it becomes part of the environment
-- and Busted will not try to GC and reload it. The ffi is not suited
-- for that and will occasionally segfault if done so.
local ffi = require "ffi"

-- Now patch ffi.cdef to only be called once with each definition
local old_cdef = ffi.cdef
local exists = {}
ffi.cdef = function(def)
if exists[def] then
return
end
exists[def] = true
return old_cdef(def)
end

end

end



do -- implement `sleep` in the `init_worker` context

-- initialization code regularly uses the shm and locks.
Expand Down Expand Up @@ -296,7 +271,7 @@ return function(options)
return first
end
end

local function resolve_connect(f, sock, host, port, opts)
if sub(host, 1, 5) ~= "unix:" then
host, port = toip(host, port)
Expand Down

0 comments on commit de0125a

Please sign in to comment.