From 0e0d8276da511e4769216bece8b36af302448f42 Mon Sep 17 00:00:00 2001 From: Fedor Dikarev Date: Thu, 28 Nov 2024 14:45:16 +0100 Subject: [PATCH 1/3] Pass start_timeout to the neon_fixtrures.py::NeonEnvBuilder::start() method and set it to 30s --- test_runner/fixtures/neon_fixtures.py | 3 ++- test_runner/regress/test_sharding.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test_runner/fixtures/neon_fixtures.py b/test_runner/fixtures/neon_fixtures.py index a45a311dc2e9..8e0f2294d2e8 100644 --- a/test_runner/fixtures/neon_fixtures.py +++ b/test_runner/fixtures/neon_fixtures.py @@ -469,6 +469,7 @@ def init_start( default_remote_storage_if_missing: bool = True, initial_tenant_shard_count: int | None = None, initial_tenant_shard_stripe_size: int | None = None, + timeout_in_seconds: int | None = None, ) -> NeonEnv: """ Default way to create and start NeonEnv. Also creates the initial_tenant with root initial_timeline. @@ -478,7 +479,7 @@ def init_start( Configuring pageserver with remote storage is now the default. There will be a warning if pageserver is created without one. """ env = self.init_configs(default_remote_storage_if_missing=default_remote_storage_if_missing) - env.start() + env.start(timeout_in_seconds=timeout_in_seconds) # Prepare the default branch to start the postgres on later. # Pageserver itself does not create tenants and timelines, until started first and asked via HTTP API. diff --git a/test_runner/regress/test_sharding.py b/test_runner/regress/test_sharding.py index 411574bd8621..7eb9047647e8 100644 --- a/test_runner/regress/test_sharding.py +++ b/test_runner/regress/test_sharding.py @@ -52,7 +52,9 @@ def test_sharding_smoke( neon_env_builder.enable_pageserver_remote_storage(s3_storage()) env = neon_env_builder.init_start( - initial_tenant_shard_count=shard_count, initial_tenant_shard_stripe_size=stripe_size + initial_tenant_shard_count=shard_count, + initial_tenant_shard_stripe_size=stripe_size, + timeout_in_seconds=30, # Just 10s is not always enough ) tenant_id = env.initial_tenant From 46668775ebe6f28bdb5ccfa956f3133ff781933d Mon Sep 17 00:00:00 2001 From: Fedor Dikarev Date: Thu, 5 Dec 2024 17:45:21 +0400 Subject: [PATCH 2/3] set timeout to 30s only debug builds --- test_runner/fixtures/neon_fixtures.py | 2 ++ test_runner/regress/test_sharding.py | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test_runner/fixtures/neon_fixtures.py b/test_runner/fixtures/neon_fixtures.py index 8e0f2294d2e8..42e182741af6 100644 --- a/test_runner/fixtures/neon_fixtures.py +++ b/test_runner/fixtures/neon_fixtures.py @@ -479,6 +479,8 @@ def init_start( Configuring pageserver with remote storage is now the default. There will be a warning if pageserver is created without one. """ env = self.init_configs(default_remote_storage_if_missing=default_remote_storage_if_missing) + if (timeout_in_seconds is None) and (os.getenv("BUILD_TYPE") == "debug"): + timeout_in_seconds = 30 env.start(timeout_in_seconds=timeout_in_seconds) # Prepare the default branch to start the postgres on later. diff --git a/test_runner/regress/test_sharding.py b/test_runner/regress/test_sharding.py index 7eb9047647e8..411574bd8621 100644 --- a/test_runner/regress/test_sharding.py +++ b/test_runner/regress/test_sharding.py @@ -52,9 +52,7 @@ def test_sharding_smoke( neon_env_builder.enable_pageserver_remote_storage(s3_storage()) env = neon_env_builder.init_start( - initial_tenant_shard_count=shard_count, - initial_tenant_shard_stripe_size=stripe_size, - timeout_in_seconds=30, # Just 10s is not always enough + initial_tenant_shard_count=shard_count, initial_tenant_shard_stripe_size=stripe_size ) tenant_id = env.initial_tenant From 94f575745061e92b4e050d7add8cb4789b59c81a Mon Sep 17 00:00:00 2001 From: Fedor Dikarev Date: Thu, 5 Dec 2024 20:27:38 +0400 Subject: [PATCH 3/3] set different timeouts for debug and release --- test_runner/fixtures/neon_fixtures.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test_runner/fixtures/neon_fixtures.py b/test_runner/fixtures/neon_fixtures.py index 42e182741af6..2dcd6405819e 100644 --- a/test_runner/fixtures/neon_fixtures.py +++ b/test_runner/fixtures/neon_fixtures.py @@ -479,8 +479,12 @@ def init_start( Configuring pageserver with remote storage is now the default. There will be a warning if pageserver is created without one. """ env = self.init_configs(default_remote_storage_if_missing=default_remote_storage_if_missing) - if (timeout_in_seconds is None) and (os.getenv("BUILD_TYPE") == "debug"): - timeout_in_seconds = 30 + if timeout_in_seconds is None: + if os.getenv("BUILD_TYPE") == "release": + timeout_in_seconds = 15 + elif os.getenv("BUILD_TYPE") == "debug": + timeout_in_seconds = 30 + env.start(timeout_in_seconds=timeout_in_seconds) # Prepare the default branch to start the postgres on later.