commit b514edcdf4747b2ebf00a97f89f310d6d4f090f5
parent c126a3756a09716ed64fd2acb9eee5d411c4aa7b
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu, 23 Nov 2023 23:05:52 +0800
test: remove the pipe created by new_pipename() (#26173)
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
@@ -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
diff --git a/test/functional/ui/embed_spec.lua b/test/functional/ui/embed_spec.lua
@@ -144,7 +144,6 @@ describe('--embed --listen UI', function()
helpers.skip(helpers.is_os('win'))
clear()
local child_server = assert(helpers.new_pipename())
- uv.fs_unlink(child_server)
funcs.jobstart({nvim_prog, '--embed', '--listen', child_server, '--clean'})
retry(nil, nil, function() neq(nil, uv.fs_stat(child_server)) end)