From 6656f02f7b9f34630af3896417d298c819b244aa Mon Sep 17 00:00:00 2001 From: Samuele Date: Tue, 14 May 2024 07:56:44 +0200 Subject: [PATCH] fix(ci): require correct `socket` module (#13026) require 'socket.unix' was causing a different socket module to be loaded If 'socket.unix' was loaded before the `socket` module, it resulted in a different socket implementation to be used, which resulted in failures when trying to access nil fields of the socket object. More info: https://konghq.atlassian.net/browse/KAG-4472 (cherry picked from commit a212d89910eac4779ea61be77178b36a348ddfc8) --- spec/busted-ci-helper.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/busted-ci-helper.lua b/spec/busted-ci-helper.lua index 424ceba6bbe6..21ab2b025f66 100644 --- a/spec/busted-ci-helper.lua +++ b/spec/busted-ci-helper.lua @@ -12,6 +12,10 @@ -- FAILED_TEST_FILES_FILE environment variable. This is used to -- reduce test rerun times for flaky tests. + +-- needed before requiring 'socket.unix' +require 'socket' + local busted = require 'busted' local cjson = require 'cjson' local socket_unix = require 'socket.unix'