test: remove the pipe created by new_pipename() (#26173)

This commit is contained in:
zeertzjq
2023-11-23 23:05:52 +08:00
committed by GitHub
parent c126a3756a
commit b514edcdf4
2 changed files with 3 additions and 1 deletions

View File

@@ -869,6 +869,9 @@ function module.new_pipename()
-- HACK: Start a server temporarily, get the name, then stop it.
local pipename = module.eval('serverstart()')
module.funcs.serverstop(pipename)
-- Remove the pipe so that trying to connect to it without a server listening
-- will be an error instead of a hang.
os.remove(pipename)
return pipename
end