From 73fa81198c658baa0e7b6ca3077857868d05552a Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Mon, 22 Apr 2024 09:02:01 +0200 Subject: [PATCH 1/3] Using pid instead of random number --- tests/integrations/django/myapp/settings.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/integrations/django/myapp/settings.py b/tests/integrations/django/myapp/settings.py index bcb137e684..8956357a51 100644 --- a/tests/integrations/django/myapp/settings.py +++ b/tests/integrations/django/myapp/settings.py @@ -10,8 +10,6 @@ https://docs.djangoproject.com/en/2.0/ref/settings/ """ -import random - # We shouldn't access settings while setting up integrations. Initialize SDK # here to provoke any errors that might occur. import sentry_sdk @@ -128,7 +126,7 @@ def middleware(request): "USER": os.environ.get("SENTRY_PYTHON_TEST_POSTGRES_USER", "postgres"), "PASSWORD": os.environ.get("SENTRY_PYTHON_TEST_POSTGRES_PASSWORD", "sentry"), "NAME": os.environ.get( - "SENTRY_PYTHON_TEST_POSTGRES_NAME", f"myapp_db_{random.randint(0, 1000)}" + "SENTRY_PYTHON_TEST_POSTGRES_NAME", f"myapp_db_{os.getpid()}" ), } except (ImportError, KeyError): From 28ccaebc64db7c57b5bff0deb6b7fe9f2c86b44d Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Mon, 22 Apr 2024 09:04:08 +0200 Subject: [PATCH 2/3] nix From 02a496d87f48cf39924ccbf5e367b7d236e85bc4 Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Mon, 22 Apr 2024 15:02:46 +0200 Subject: [PATCH 3/3] nix