Skip to content

Commit 445cd5b

Browse files
authored
Increase timeout in a test of language server (#9076)
1 parent 4fbff8a commit 445cd5b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_language_server.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ def send(self, request: typing.Any):
122122
self.stream_in.flush()
123123

124124
def recv(self, timeout_sec=5) -> dict:
125+
"""
126+
Receive a message over LSP. Timeout after X seconds.
127+
128+
When server is supposed to do just light work
129+
(parsing and such), timeout should be 10sec (some of our CI workers are
130+
slow). When server is compiling it should be 50sec.
131+
"""
132+
125133
while True:
126134
msg = self.stream_reader.get_next(timeout_sec)
127135
if msg.get("method", None) == "window/logMessage":
@@ -573,7 +581,7 @@ def test_language_server_diagnostics_05(self):
573581
}
574582
)
575583
self.assertEqual(
576-
runner.recv(timeout_sec=10),
584+
runner.recv(timeout_sec=50),
577585
{
578586
"jsonrpc": "2.0",
579587
"method": "textDocument/publishDiagnostics",

0 commit comments

Comments
 (0)