diff options
author | Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com> | 2021-06-13 02:53:05 +0530 |
---|---|---|
committer | Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com> | 2021-09-20 18:10:40 +0530 |
commit | 73d12a8b711743b1441f4029bee48cbaaf7791ec (patch) | |
tree | 07fd20364c86a36a37103cb5cb6e199150cffb5b /test/functional/core/channels_spec.lua | |
parent | 490e09c6d81b9bf52eac7aa146e62b3da2d86579 (diff) | |
download | rneovim-73d12a8b711743b1441f4029bee48cbaaf7791ec.tar.gz rneovim-73d12a8b711743b1441f4029bee48cbaaf7791ec.tar.bz2 rneovim-73d12a8b711743b1441f4029bee48cbaaf7791ec.zip |
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>
Diffstat (limited to 'test/functional/core/channels_spec.lua')
-rw-r--r-- | test/functional/core/channels_spec.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/core/channels_spec.lua b/test/functional/core/channels_spec.lua index 6efa4f9b80..93dec9fb35 100644 --- a/test/functional/core/channels_spec.lua +++ b/test/functional/core/channels_spec.lua @@ -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']]]))") |