Skip to content

Commit

Permalink
Fix java restart server tests to wait long enough
Browse files Browse the repository at this point in the history
  • Loading branch information
puremourning committed Dec 13, 2024
1 parent d6d035c commit dab4ad4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions ycmd/tests/java/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ def StartJavaCompleterServerWithFile( app, file_path ):
event_name = 'FileReadyToParse',
filepath = file_path,
filetype = 'java' ) )
WaitUntilJavaCompleterServerReady( app )


def WaitUntilJavaCompleterServerReady( app ):
WaitUntilCompleterServerReady( app, 'java', SERVER_STARTUP_TIMEOUT )


Expand Down
12 changes: 6 additions & 6 deletions ycmd/tests/java/server_management_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
isolated_app,
IsolatedYcmd,
StartJavaCompleterServerInDirectory,
StartJavaCompleterServerWithFile )
StartJavaCompleterServerWithFile,
WaitUntilJavaCompleterServerReady )
from ycmd.tests.test_utils import ( BuildRequest,
CompleterProjectDirectoryMatcher,
LocationMatcher,
MockProcessTerminationTimingOut,
RangeMatcher,
TemporaryTestDir,
WaitForDiagnosticsToBeReady,
WaitUntilCompleterServerReady )
WaitForDiagnosticsToBeReady )
from ycmd import utils, handlers


Expand Down Expand Up @@ -104,7 +104,7 @@ def test_ServerManagement_RestartServer( self, app ):
),
)

WaitUntilCompleterServerReady( app, 'java' )
WaitUntilJavaCompleterServerReady( app )

app.post_json(
'/event_notification',
Expand Down Expand Up @@ -147,7 +147,7 @@ def test_ServerManagement_WipeWorkspace_NoConfig( self ):
),
)

WaitUntilCompleterServerReady( app, 'java' )
WaitUntilJavaCompleterServerReady( app )

assert_that(
app.post_json( '/debug_info',
Expand Down Expand Up @@ -197,7 +197,7 @@ def test_ServerManagement_WipeWorkspace_WithConfig( self ):
),
)

WaitUntilCompleterServerReady( app, 'java' )
WaitUntilJavaCompleterServerReady( app )

assert_that(
app.post_json( '/debug_info',
Expand Down

0 comments on commit dab4ad4

Please sign in to comment.