From 5993b2bedc651ec1c7d29883178583fde69e5616 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Wed, 9 Aug 2023 16:27:53 +0100 Subject: [PATCH] test_runner: remove excessive timeouts (#4659) ## Problem For some tests, we override the default timeout (300s / 5m) with a larger values like 600s / 10m or even 1800s / 30m, even if it's not required. I've collected some statistics (for the last 60 days) for tests duration: | test | max (s) | p99 (s) | p50 (s) | count | |-----------------------------------|---------|---------|---------|-------| | test_hot_standby | 9 | 2 | 2 | 5319 | | test_import_from_vanilla | 16 | 9 | 6 | 5692 | | test_import_from_pageserver_small | 37 | 7 | 5 | 5719 | | test_pg_regress | 101 | 73 | 44 | 5642 | | test_isolation | 65 | 56 | 39 | 5692 | A couple of tests that I left with custom 600s / 10m timeout. | test | max (s) | p99 (s) | p50 (s) | count | |-----------------------------------|---------|---------|---------|-------| | test_gc_cutoff | 456 | 224 | 109 | 5694 | | test_pageserver_chaos | 528 | 267 | 121 | 5712 | ## Summary of changes - Remove `@pytest.mark.timeout` annotation from several tests --- test_runner/regress/test_hot_standby.py | 2 -- test_runner/regress/test_import.py | 2 -- test_runner/regress/test_pg_regress.py | 7 ------- 3 files changed, 11 deletions(-) diff --git a/test_runner/regress/test_hot_standby.py b/test_runner/regress/test_hot_standby.py index 6b003ce356..031fd2857d 100644 --- a/test_runner/regress/test_hot_standby.py +++ b/test_runner/regress/test_hot_standby.py @@ -1,10 +1,8 @@ import time -import pytest from fixtures.neon_fixtures import NeonEnv -@pytest.mark.timeout(1800) def test_hot_standby(neon_simple_env: NeonEnv): env = neon_simple_env diff --git a/test_runner/regress/test_import.py b/test_runner/regress/test_import.py index d35366b467..68086d3f84 100644 --- a/test_runner/regress/test_import.py +++ b/test_runner/regress/test_import.py @@ -23,7 +23,6 @@ from fixtures.types import Lsn, TenantId, TimelineId from fixtures.utils import subprocess_capture -@pytest.mark.timeout(600) def test_import_from_vanilla(test_output_dir, pg_bin, vanilla_pg, neon_env_builder): # Put data in vanilla pg vanilla_pg.start() @@ -163,7 +162,6 @@ def test_import_from_vanilla(test_output_dir, pg_bin, vanilla_pg, neon_env_build assert endpoint.safe_psql("select count(*) from t") == [(300000,)] -@pytest.mark.timeout(600) def test_import_from_pageserver_small(pg_bin: PgBin, neon_env_builder: NeonEnvBuilder): neon_env_builder.enable_local_fs_remote_storage() env = neon_env_builder.init_start() diff --git a/test_runner/regress/test_pg_regress.py b/test_runner/regress/test_pg_regress.py index d765316174..ee600db2c6 100644 --- a/test_runner/regress/test_pg_regress.py +++ b/test_runner/regress/test_pg_regress.py @@ -3,15 +3,11 @@ # from pathlib import Path -import pytest from fixtures.neon_fixtures import NeonEnv, check_restored_datadir_content # Run the main PostgreSQL regression tests, in src/test/regress. # -# This runs for a long time, especially in debug mode, so use a larger-than-default -# timeout. -@pytest.mark.timeout(1800) def test_pg_regress( neon_simple_env: NeonEnv, test_output_dir: Path, @@ -69,9 +65,6 @@ def test_pg_regress( # Run the PostgreSQL "isolation" tests, in src/test/isolation. # -# This runs for a long time, especially in debug mode, so use a larger-than-default -# timeout. -@pytest.mark.timeout(1800) def test_isolation( neon_simple_env: NeonEnv, test_output_dir: Path,