mirror of
https://github.com/neovim/neovim.git
synced 2026-05-03 12:35:00 +00:00
test(lsp): fix fake LSP server timeout not working (#37970)
Problem: Fake LSP server does not timeout or respond to SIGTERM as it
does not run the event loop.
Solution: Instead of io.read(), use stdioopen()'s on_stdin callback to
accumulate input and use vim.wait() to wait for input.
Also, in the test suite, don't stop a session when it's not running, as
calling uv.stop() outside uv.run() will instead cause the next uv.run()
to stop immediately, which cancels the next RPC request.
This commit is contained in:
@@ -110,6 +110,7 @@ M.create_server_definition = function()
|
||||
|
||||
function srv.terminate()
|
||||
closing = true
|
||||
dispatchers.on_exit(0, 15)
|
||||
end
|
||||
|
||||
return srv
|
||||
|
||||
Reference in New Issue
Block a user