third_party/blink/tools/blinkpy/web_tests/servers/server_base.py
def _is_server_running_on_all_ports(self,
                                        success_log_level=logging.INFO,
                                        failure_log_level=logging.DEBUG):
        """Returns whether the server is running on all the desired ports.

        Args:
            success_log_level: Logging level for success (default: INFO)
            failure_log_level: Logging level for failure (default: DEBUG)
        """
        # Check self._pid instead of self._process because the latter might be a
        # control process that exits after spawning up the daemon.
        # TODO(dpranke): crbug/378444 maybe pid is unreliable on win?
        if (not self._platform.is_win()
                and not self._executive.check_running_pid(self._pid)):
            _log.debug("Server isn't running at all")
            self._log_errors_from_subprocess()
            raise ServerError('Server exited')

        for mapping in self._mappings:
            port = mapping['port']
            scheme = mapping['scheme']
            if scheme == 'webtransport-h3':
                if not _is_webtransport_h3_server_running(port):
                    _log.log(failure_log_level,
                             'WebTransportH3 server NOT running on '\
                             'https://localhost:%d', port)
                    return False
                _log.log(
                    success_log_level,
                    'WebTransportH3 server running on https://localhost:%d',
                    port)
                continue
            s = socket.socket()
            try:
                s.connect(('localhost', port))
                _log.log(success_log_level,
                         'Server running on %s://localhost:%d', scheme, port)
            except IOError as error:
                if error.errno not in (errno.ECONNREFUSED, errno.ECONNRESET):
                    raise
                _log.log(failure_log_level,
                         'Server NOT running on %s://localhost:%d : %s',
                         scheme, port, error)
                return False
            finally:
                s.close()
        return True
Returns whether the server is running on all the desired ports.

        Args:
            success_log_level: Logging level for success (default: INFO)
            failure_log_level: Logging level for failure (default: DEBUG)
        
Returns whether the server is running on all the desired ports.
Returns whether the server is running on all the desired ports .
def _is_server_running_on_all_ports(self,
                                        success_log_level=logging.INFO,
                                        failure_log_level=logging.DEBUG):
        if (not self._platform.is_win()
                and not self._executive.check_running_pid(self._pid)):
            _log.debug("Server isn't running at all")
            self._log_errors_from_subprocess()
            raise ServerError('Server exited')
        for mapping in self._mappings:
            port = mapping['port']
            scheme = mapping['scheme']
            if scheme == 'webtransport-h3':
                if not _is_webtransport_h3_server_running(port):
                    _log.log(failure_log_level,
                             'WebTransportH3 server NOT running on '\
                             'https://localhost:%d', port)
                    return False
                _log.log(
                    success_log_level,
                    'WebTransportH3 server running on https://localhost:%d',
                    port)
                continue
            s = socket.socket()
            try:
                s.connect(('localhost', port))
                _log.log(success_log_level,
                         'Server running on %s://localhost:%d', scheme, port)
            except IOError as error:
                if error.errno not in (errno.ECONNREFUSED, errno.ECONNRESET):
                    raise
                _log.log(failure_log_level,
                         'Server NOT running on %s://localhost:%d : %s',
                         scheme, port, error)
                return False
            finally:
                s.close()
        return True
def _is_server_running_on_all_ports ( self , success_log_level = logging . INFO , failure_log_level = logging . DEBUG ) : if ( not self . _platform . is_win ( ) and not self . _executive . check_running_pid ( self . _pid ) ) : _log . debug ( "Server isn't running at all" ) self . _log_errors_from_subprocess ( ) raise ServerError ( 'Server exited' ) for mapping in self . _mappings : port = mapping [ 'port' ] scheme = mapping [ 'scheme' ] if scheme == 'webtransport-h3' : if not _is_webtransport_h3_server_running ( port ) : _log . log ( failure_log_level , 'WebTransportH3 server NOT running on ' 'https://localhost:%d' , port ) return False _log . log ( success_log_level , 'WebTransportH3 server running on https://localhost:%d' , port ) continue s = socket . socket ( ) try : s . connect ( ( 'localhost' , port ) ) _log . log ( success_log_level , 'Server running on %s://localhost:%d' , scheme , port ) except IOError as error : if error . errno not in ( errno . ECONNREFUSED , errno . ECONNRESET ) : raise _log . log ( failure_log_level , 'Server NOT running on %s://localhost:%d : %s' , scheme , port , error ) return False finally : s . close ( ) return True
Returns whether the server is running on all the desired ports.
Returns whether the server is running on all the desired ports .
"""Returns whether the server is running on all the desired ports.

        Args:
            success_log_level: Logging level for success (default: INFO)
            failure_log_level: Logging level for failure (default: DEBUG)
        """ # Check self._pid instead of self._process because the latter might be a # control process that exits after spawning up the daemon. # TODO(dpranke): crbug/378444 maybe pid is unreliable on win?
self
success_log_level
Logging level for success (default: INFO)
Logging level for success ( default : INFO )
failure_log_level
Logging level for failure (default: DEBUG)
Logging level for failure ( default : DEBUG )