diff --git a/test-sourcekit-lsp/test-sourcekit-lsp.py b/test-sourcekit-lsp/test-sourcekit-lsp.py index 969388d..062c12c 100644 --- a/test-sourcekit-lsp/test-sourcekit-lsp.py +++ b/test-sourcekit-lsp/test-sourcekit-lsp.py @@ -110,7 +110,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(): @@ -227,7 +232,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: