mirror of
https://github.com/neovim/neovim.git
synced 2025-12-02 23:13:01 +00:00
test: fix running functional tests under gdbserver
It was not possible to run the tests under the gdbserver because we were not closing the old session before starting a new one. This caused the server to not to be able to bind to the given address and crashing the tests. This commit closes the session before starting a new one. Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
This commit is contained in:
@@ -29,11 +29,11 @@ describe('channels', function()
|
||||
end)
|
||||
|
||||
pending('can connect to socket', function()
|
||||
local server = spawn(nvim_argv)
|
||||
local server = spawn(nvim_argv, nil, nil, true)
|
||||
set_session(server)
|
||||
local address = funcs.serverlist()[1]
|
||||
local client = spawn(nvim_argv)
|
||||
set_session(client, true)
|
||||
local client = spawn(nvim_argv, nil, nil, true)
|
||||
set_session(client)
|
||||
source(init)
|
||||
|
||||
meths.set_var('address', address)
|
||||
@@ -42,11 +42,11 @@ describe('channels', function()
|
||||
ok(id > 0)
|
||||
|
||||
command("call chansend(g:id, msgpackdump([[2,'nvim_set_var',['code',23]]]))")
|
||||
set_session(server, true)
|
||||
set_session(server)
|
||||
retry(nil, 1000, function()
|
||||
eq(23, meths.get_var('code'))
|
||||
end)
|
||||
set_session(client, true)
|
||||
set_session(client)
|
||||
|
||||
command("call chansend(g:id, msgpackdump([[0,0,'nvim_eval',['2+3']]]))")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user