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
This commit is contained in:
Dmitry Rodionov
2022-08-22 17:54:03 +03:00
committed by Dmitry Rodionov
parent 832e60c2b4
commit 9dd19ec397
2 changed files with 4 additions and 33 deletions

View File

@@ -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:

View File

@@ -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 (