diff --git a/test-sourcekit-lsp/test-sourcekit-lsp.py b/test-sourcekit-lsp/test-sourcekit-lsp.py index 51c1d26..15e1e51 100644 --- a/test-sourcekit-lsp/test-sourcekit-lsp.py +++ b/test-sourcekit-lsp/test-sourcekit-lsp.py @@ -108,7 +108,12 @@ def wait_for_exit(self, timeout: int) -> int: """ Wait for the LSP server to terminate. """ - return self.process.wait(timeout) + stdout, stderr = self.process.communicate(timeout=timeout) + print("stdout before exit") + print(stdout) + print("stderr before exit") + print(stderr) + return self.process.returncode def main(): @@ -225,7 +230,7 @@ def main(): connection.send_request("shutdown", {}) connection.send_notification("exit", {}) - return_code = connection.wait_for_exit(timeout=1) + return_code = connection.wait_for_exit(timeout=5) if return_code == 0: print("OK") else: