Пример #1
0
  def wait_for_connection(self, retries=100000):
    """Waits while instance is booting.

    Args:
      retries: int, Number of connection retries.

    Raises:
      http_utils.HostNotReachable: if host:port can't be reached after given
          number of retries.
    """
    # If there was a prior error, we don't need to wait for a connection.
    if self._prior_error:
      return

    http_utils.wait_for_connection(self._host, self._port, retries)
Пример #2
0
  def wait_for_connection(self, retries=100000):
    """Waits while instance is booting.

    Args:
      retries: int, Number of connection retries.

    Raises:
      http_utils.HostNotReachable: if host:port can't be reached after given
          number of retries.
    """
    # If there was a prior error, we don't need to wait for a connection.
    if self._prior_error:
      return

    http_utils.wait_for_connection(self._host, self._port, retries)
Пример #3
0
 def start(self):
   self._server.Start()
   http_utils.wait_for_connection(self._server.host, self._server.port, 100)