From 9dd19ec397b27d2766f6a66d5d4000647607a7e7 Mon Sep 17 00:00:00 2001 From: Dmitry Rodionov Date: Mon, 22 Aug 2022 17:54:03 +0300 Subject: [PATCH] Remove interferring proc check We do not need it anymore because ports_distributor checks whether the port can be used before giving it to service --- .github/workflows/benchmarking.yml | 8 ++++---- test_runner/fixtures/neon_fixtures.py | 29 --------------------------- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/.github/workflows/benchmarking.yml b/.github/workflows/benchmarking.yml index 8080d6b7db..4ed6ac80fd 100644 --- a/.github/workflows/benchmarking.yml +++ b/.github/workflows/benchmarking.yml @@ -106,7 +106,7 @@ jobs: mkdir -p perf-report-staging # Set --sparse-ordering option of pytest-order plugin to ensure tests are running in order of appears in the file, # it's important for test_perf_pgbench.py::test_pgbench_remote_* tests - ./scripts/pytest test_runner/performance/ -v -m "remote_cluster" --sparse-ordering --skip-interfering-proc-check --out-dir perf-report-staging --timeout 5400 + ./scripts/pytest test_runner/performance/ -v -m "remote_cluster" --sparse-ordering --out-dir perf-report-staging --timeout 5400 - name: Submit result env: @@ -186,7 +186,7 @@ jobs: mkdir -p perf-report-captest psql $BENCHMARK_CONNSTR -c "SELECT 1;" - ./scripts/pytest test_runner/performance/test_perf_pgbench.py::test_pgbench_remote_init -v -m "remote_cluster" --skip-interfering-proc-check --out-dir perf-report-captest --timeout 21600 + ./scripts/pytest test_runner/performance/test_perf_pgbench.py::test_pgbench_remote_init -v -m "remote_cluster" --out-dir perf-report-captest --timeout 21600 - name: Benchmark simple-update env: @@ -194,7 +194,7 @@ jobs: BENCHMARK_CONNSTR: ${{ secrets[matrix.connstr] }} run: | psql $BENCHMARK_CONNSTR -c "SELECT 1;" - ./scripts/pytest test_runner/performance/test_perf_pgbench.py::test_pgbench_remote_simple_update -v -m "remote_cluster" --skip-interfering-proc-check --out-dir perf-report-captest --timeout 21600 + ./scripts/pytest test_runner/performance/test_perf_pgbench.py::test_pgbench_remote_simple_update -v -m "remote_cluster" --out-dir perf-report-captest --timeout 21600 - name: Benchmark select-only env: @@ -202,7 +202,7 @@ jobs: BENCHMARK_CONNSTR: ${{ secrets[matrix.connstr] }} run: | psql $BENCHMARK_CONNSTR -c "SELECT 1;" - ./scripts/pytest test_runner/performance/test_perf_pgbench.py::test_pgbench_remote_select_only -v -m "remote_cluster" --skip-interfering-proc-check --out-dir perf-report-captest --timeout 21600 + ./scripts/pytest test_runner/performance/test_perf_pgbench.py::test_pgbench_remote_select_only -v -m "remote_cluster" --out-dir perf-report-captest --timeout 21600 - name: Submit result env: diff --git a/test_runner/fixtures/neon_fixtures.py b/test_runner/fixtures/neon_fixtures.py index f4ed937f02..f1cffbe5ef 100644 --- a/test_runner/fixtures/neon_fixtures.py +++ b/test_runner/fixtures/neon_fixtures.py @@ -15,7 +15,6 @@ import tempfile import textwrap import time import uuid -import warnings from contextlib import closing, contextmanager from dataclasses import dataclass, field from enum import Flag, auto @@ -68,15 +67,6 @@ BASE_PORT = 15000 WORKER_PORT_NUM = 1000 -def pytest_addoption(parser): - parser.addoption( - "--skip-interfering-proc-check", - dest="skip_interfering_proc_check", - action="store_true", - help="skip check for interfering processes", - ) - - # These are set in pytest_configure() base_dir = "" neon_binpath = "" @@ -84,30 +74,11 @@ pg_distrib_dir = "" top_output_dir = "" -def check_interferring_processes(config): - if config.getoption("skip_interfering_proc_check"): - warnings.warn("interfering process check is skipped") - return - - # does not use -c as it is not supported on macOS - cmd = ["pgrep", "pageserver|postgres|safekeeper"] - result = subprocess.run(cmd, stdout=subprocess.DEVNULL) - if result.returncode == 0: - # returncode of 0 means it found something. - # This is bad; we don't want any of those processes polluting the - # result of the test. - # NOTE this shows as an internal pytest error, there might be a better way - raise Exception( - "Found interfering processes running. Stop all Neon pageservers, nodes, safekeepers, as well as stand-alone Postgres." - ) - - def pytest_configure(config): """ Ensure that no unwanted daemons are running before we start testing. Check that we do not overflow available ports range. """ - check_interferring_processes(config) numprocesses = config.getoption("numprocesses") if (