From 326bfcc6289a376ec546dc310da101eab09c9f26 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Fri, 20 Oct 2017 00:37:22 +0100 Subject: [PATCH] Increase the timeout for the shutdown tests for our CI environment --- ycmd/tests/shutdown_test.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ycmd/tests/shutdown_test.py b/ycmd/tests/shutdown_test.py index 7916022254..f8256fbe7f 100644 --- a/ycmd/tests/shutdown_test.py +++ b/ycmd/tests/shutdown_test.py @@ -26,6 +26,9 @@ from ycmd.tests.client_test import Client_test +# Time to wait for all the servers to shutdown. Tweak for the CI environment. +SUBSERVER_SHUTDOWN_TIMEOUT = 10 + class Shutdown_test( Client_test ): @@ -37,7 +40,7 @@ def FromHandlerWithoutSubserver_test( self ): response = self.PostRequest( 'shutdown' ) self.AssertResponse( response ) assert_that( response.json(), equal_to( True ) ) - self.AssertServersShutDown( timeout = 5 ) + self.AssertServersShutDown( timeout = SUBSERVER_SHUTDOWN_TIMEOUT ) self.AssertLogfilesAreRemoved() @@ -59,7 +62,7 @@ def FromHandlerWithSubservers_test( self ): response = self.PostRequest( 'shutdown' ) self.AssertResponse( response ) assert_that( response.json(), equal_to( True ) ) - self.AssertServersShutDown( timeout = 5 ) + self.AssertServersShutDown( timeout = SUBSERVER_SHUTDOWN_TIMEOUT ) self.AssertLogfilesAreRemoved() @@ -68,7 +71,7 @@ def FromWatchdogWithoutSubserver_test( self ): self.Start( idle_suicide_seconds = 2, check_interval_seconds = 1 ) self.AssertServersAreRunning() - self.AssertServersShutDown( timeout = 5 ) + self.AssertServersShutDown( timeout = SUBSERVER_SHUTDOWN_TIMEOUT ) self.AssertLogfilesAreRemoved() @@ -87,5 +90,5 @@ def FromWatchdogWithSubservers_test( self ): self.StartSubserverForFiletype( filetype ) self.AssertServersAreRunning() - self.AssertServersShutDown( timeout = 15 ) + self.AssertServersShutDown( timeout = SUBSERVER_SHUTDOWN_TIMEOUT + 10 ) self.AssertLogfilesAreRemoved()