def wait_for_services(self, timeout: int = 120) -> None:
        """Wait for all services to be ready.

        Args:
            timeout: Maximum time to wait in seconds

        Raises:
            TimeoutError: If services don't become ready within timeout
        """
        logger.info(f"Waiting for services to be ready (timeout: {timeout}s)")

        # Define service health check endpoints
        health_checks = [
            {
                "name": "backend",
                "url": "http://localhost:9001/health",
                "expected_status": 200,
            }
        ]

        # Wait for all services to be ready
        start_time = time.time()
        services_ready = False

        while time.time() - start_time < timeout and not services_ready:
            pending_services = []

            for service in health_checks:
                if not self._check_service_health(service):
                    pending_services.append(service["name"])

            if not pending_services:
                services_ready = True
                logger.info("All services are ready")
                break

            logger.debug(f"Waiting for services: {', '.join(pending_services)}")
            time.sleep(2)

        if not services_ready:
            # Get logs to help diagnose issues
            logs = self._collect_container_logs()

            pending_services_str = ", ".join(
                [s["name"] for s in health_checks if s["name"] in pending_services]
            )
            error_msg = f"Services not ready within timeout: {pending_services_str}"
            if logs:
                error_msg += "\nContainer logs:\n"
                for container_id, container_logs in logs.items():
                    error_msg += f"\n--- Container {container_id} ---\n{container_logs}\n"

            raise TimeoutError(error_msg)
Wait for all services to be ready.

        Args:
            timeout: Maximum time to wait in seconds

        Raises:
            TimeoutError: If services don't become ready within timeout
        
backend/tests/helpers/docker.py