diff --git a/pocket_ic/pocket_ic_server.py b/pocket_ic/pocket_ic_server.py index 2da42a6..336e2f2 100644 --- a/pocket_ic/pocket_ic_server.py +++ b/pocket_ic/pocket_ic_server.py @@ -120,20 +120,14 @@ def set_blob_store_entry(self, blob: bytes, compression: Optional[str]) -> str: return response.text def _get_url(self, port_file_path: int) -> str: - stop_at = time.time() + 10 # Wait for the port file for 10 seconds - while True: if os.path.isfile(port_file_path): with open(port_file_path, "r", encoding="utf-8") as port_file: port = port_file.readline() if "\n" in port: return f"http://127.0.0.1:{port.strip()}" - time.sleep(0.02) # wait for 20ms - if time.time() > stop_at: - raise TimeoutError("PocketIC failed to start") - def _check_response(self, response: requests.Response): self._check_status_code(response) res_json = response.json()