From 3e7f14c8c1dc40adfdaf5f073e616102987378ef Mon Sep 17 00:00:00 2001 From: Tom Most Date: Tue, 6 Aug 2024 23:05:02 -0700 Subject: [PATCH] Don't allow notdatadog in tests pytest-socket resolves the hostnames in the --allow-hosts setting for each test, so removing notdatadog saves ~4k DNS resolution attempts. Note that the tests run with a stripe container present. Resolving the stripe hostname doesn't result in a DNS resolution because getaddrinfo resolves the name by reading the /etc/hosts file populated by Docker (same story for localhost). --- docker-compose.yml | 2 -- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ab67197701cf..03ba0c118b86 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -139,8 +139,6 @@ services: condition: service_healthy stripe: condition: service_started - notdatadog: - condition: service_started files: image: warehouse:docker-compose diff --git a/pyproject.toml b/pyproject.toml index a04216b88d15..1d9e7d6f4892 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,7 +88,7 @@ ignore_missing_imports = true [tool.pytest.ini_options] addopts = [ "--disable-socket", - "--allow-hosts=localhost,::1,notdatadog,stripe", + "--allow-hosts=localhost,::1,stripe", "--durations=20", "--numprocesses=auto", ]