Check if server is ready before running tests
This commit is contained in:
parent
25a2e3120c
commit
f31102e317
@ -110,6 +110,7 @@ def YouCompleteMeInstance( custom_options = {} ):
|
||||
def Wrapper( *args, **kwargs ):
|
||||
ycm = YouCompleteMe( _MakeUserOptions( custom_options ) )
|
||||
WaitUntilReady()
|
||||
ycm.CheckIfServerIsReady()
|
||||
try:
|
||||
test( ycm, *args, **kwargs )
|
||||
finally:
|
||||
|
@ -105,10 +105,7 @@ def MockEventNotification( response_method, native_filetype_completer = True ):
|
||||
'ycm.youcompleteme.YouCompleteMe.FiletypeCompleterExistsForFiletype',
|
||||
return_value = native_filetype_completer ):
|
||||
|
||||
with patch( 'ycm.youcompleteme.YouCompleteMe.IsServerReady',
|
||||
return_value = True ):
|
||||
|
||||
yield
|
||||
yield
|
||||
|
||||
|
||||
@patch( 'ycm.vimsupport.PostVimMessage', new_callable = ExtendedMock )
|
||||
@ -352,8 +349,6 @@ def _Check_FileReadyToParse_Diagnostic_Clean( ycm, vim_command ):
|
||||
|
||||
|
||||
@patch( 'ycm.youcompleteme.YouCompleteMe._AddUltiSnipsDataIfNeeded' )
|
||||
@patch( 'ycm.youcompleteme.YouCompleteMe.IsServerReady',
|
||||
return_value = True )
|
||||
@YouCompleteMeInstance( { 'collect_identifiers_from_tags_files': 1 } )
|
||||
def EventNotification_FileReadyToParse_TagFiles_UnicodeWorkingDirectory_test(
|
||||
ycm, *args ):
|
||||
@ -498,8 +493,6 @@ def EventNotification_BufferUnload_BuildRequestForDeletedAndUnsavedBuffers_test(
|
||||
|
||||
@patch( 'ycm.syntax_parse.SyntaxKeywordsForCurrentBuffer',
|
||||
return_value = [ 'foo', 'bar' ] )
|
||||
@patch( 'ycm.youcompleteme.YouCompleteMe.IsServerReady',
|
||||
return_value = True )
|
||||
@YouCompleteMeInstance( { 'seed_identifiers_with_syntax': 1 } )
|
||||
def EventNotification_FileReadyToParse_SyntaxKeywords_SeedWithCache_test(
|
||||
ycm, *args ):
|
||||
@ -534,8 +527,6 @@ def EventNotification_FileReadyToParse_SyntaxKeywords_SeedWithCache_test(
|
||||
|
||||
@patch( 'ycm.syntax_parse.SyntaxKeywordsForCurrentBuffer',
|
||||
return_value = [ 'foo', 'bar' ] )
|
||||
@patch( 'ycm.youcompleteme.YouCompleteMe.IsServerReady',
|
||||
return_value = True )
|
||||
@YouCompleteMeInstance( { 'seed_identifiers_with_syntax': 1 } )
|
||||
def EventNotification_FileReadyToParse_SyntaxKeywords_ClearCacheIfRestart_test(
|
||||
ycm, *args ):
|
||||
|
@ -349,8 +349,6 @@ def YouCompleteMe_ShowDiagnostics_NoDiagnosticsDetected_test(
|
||||
'open_loclist_on_ycm_diags': 0 } )
|
||||
@patch( 'ycm.youcompleteme.YouCompleteMe.FiletypeCompleterExistsForFiletype',
|
||||
return_value = True )
|
||||
@patch( 'ycm.youcompleteme.YouCompleteMe.IsServerReady',
|
||||
return_value = True )
|
||||
@patch( 'ycm.vimsupport.PostVimMessage', new_callable = ExtendedMock )
|
||||
@patch( 'ycm.vimsupport.SetLocationList', new_callable = ExtendedMock )
|
||||
def YouCompleteMe_ShowDiagnostics_DiagnosticsFound_DoNotOpenLocationList_test(
|
||||
@ -390,8 +388,6 @@ def YouCompleteMe_ShowDiagnostics_DiagnosticsFound_DoNotOpenLocationList_test(
|
||||
@YouCompleteMeInstance( { 'open_loclist_on_ycm_diags': 1 } )
|
||||
@patch( 'ycm.youcompleteme.YouCompleteMe.FiletypeCompleterExistsForFiletype',
|
||||
return_value = True )
|
||||
@patch( 'ycm.youcompleteme.YouCompleteMe.IsServerReady',
|
||||
return_value = True )
|
||||
@patch( 'ycm.vimsupport.PostVimMessage', new_callable = ExtendedMock )
|
||||
@patch( 'ycm.vimsupport.SetLocationList', new_callable = ExtendedMock )
|
||||
@patch( 'ycm.vimsupport.OpenLocationList', new_callable = ExtendedMock )
|
||||
@ -435,8 +431,6 @@ def YouCompleteMe_ShowDiagnostics_DiagnosticsFound_OpenLocationList_test(
|
||||
'enable_diagnostic_highlighting': 1 } )
|
||||
@patch( 'ycm.youcompleteme.YouCompleteMe.FiletypeCompleterExistsForFiletype',
|
||||
return_value = True )
|
||||
@patch( 'ycm.youcompleteme.YouCompleteMe.IsServerReady',
|
||||
return_value = True )
|
||||
@patch( 'ycm.vimsupport.PostVimMessage', new_callable = ExtendedMock )
|
||||
@patch( 'vim.command', new_callable = ExtendedMock )
|
||||
def YouCompleteMe_UpdateDiagnosticInterface_PrioritizeErrorsOverWarnings_test(
|
||||
|
Loading…
Reference in New Issue
Block a user