File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
ada_lsp/configuration_warning_null_setting Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 33not when resetting it using a null value for a setting.
44"""
55
6- import asyncio
76from drivers .pylsp import (
87 ALSLanguageClient ,
98 assertEqual ,
@@ -43,7 +42,7 @@ async def main(lsp: ALSLanguageClient) -> None:
4342 )
4443
4544 # Wait for didChangeConfig to be handled
46- await asyncio .sleep (2 )
45+ await lsp .sleep (2 )
4746
4847 total_log_msg = len (lsp .log_messages )
4948 total_show_msg = len (lsp .messages )
@@ -54,7 +53,7 @@ async def main(lsp: ALSLanguageClient) -> None:
5453 lsp .didChangeConfig ({"logThreshold" : None , "insertWithClauses" : None })
5554
5655 # Wait for didChangeConfig to be handled
57- await asyncio .sleep (2 )
56+ await lsp .sleep (2 )
5857
5958 # Check that no messages were sent after using None/null as the value for
6059 # a setting
Original file line number Diff line number Diff line change @@ -480,6 +480,11 @@ def assertLocationsList(
480480 """
481481 assertLocationsList (actual , expected )
482482
483+ async def sleep (self , seconds : float ) -> None :
484+ """Wait for the given amount of seconds multiplied by ALS_WAIT_FACTOR."""
485+ wait_factor : int = int (os .environ .get ("ALS_WAIT_FACTOR" , "1" ))
486+ await asyncio .sleep (seconds * wait_factor )
487+
483488
484489def als_client_factory () -> ALSLanguageClient :
485490 """This function is an ugly copy-paste of pytest_lsp.make_test_lsp_client. It is
You can’t perform that action at this time.
0 commit comments