This commit is contained in:
Heikki Linnakangas
2024-09-11 01:26:46 +03:00
parent a6e64fcc90
commit bfae8ff23e
5 changed files with 157 additions and 17 deletions

View File

@@ -7,7 +7,7 @@ from fixtures.neon_fixtures import NeonEnv, NeonEnvBuilder
#
# Test starting Postgres with custom options
#
def test_configx(neon_simple_env: NeonEnv):
def test_config(neon_simple_env: NeonEnv):
env = neon_simple_env
# change config
@@ -29,6 +29,50 @@ def test_configx(neon_simple_env: NeonEnv):
# check that config change was applied
assert cur.fetchone() == ("debug1",)
def test_shared_config1(neon_shared_env: NeonEnv):
env = neon_shared_env
# change config
endpoint = env.endpoints.create_start("main", config_lines=["log_min_messages=debug1"])
with closing(endpoint.connect()) as conn:
with conn.cursor() as cur:
cur.execute(
"""
SELECT setting
FROM pg_settings
WHERE
source != 'default'
AND source != 'override'
AND name = 'log_min_messages'
"""
)
# check that config change was applied
assert cur.fetchone() == ("debug1",)
def test_shared_config2(neon_shared_env: NeonEnv):
env = neon_shared_env
# change config
endpoint = env.endpoints.create_start("main", config_lines=["log_min_messages=debug1"])
with closing(endpoint.connect()) as conn:
with conn.cursor() as cur:
cur.execute(
"""
SELECT setting
FROM pg_settings
WHERE
source != 'default'
AND source != 'override'
AND name = 'log_min_messages'
"""
)
# check that config change was applied
assert cur.fetchone() == ("debug1",)
#
# Test that reordering of safekeepers does not restart walproposer

View File

@@ -6,8 +6,8 @@ from fixtures.neon_fixtures import NeonEnv, wait_replica_caughtup
#
# Test that redo of XLOG_GIN_VACUUM_PAGE doesn't produce error
#
def test_gin_redo(neon_simple_env: NeonEnv):
env = neon_simple_env
def test_gin_redo(neon_shared_env: NeonEnv):
env = neon_shared_env
primary = env.endpoints.create_start(branch_name="main", endpoint_id="primary")
time.sleep(1)

View File

@@ -7,8 +7,8 @@ from fixtures.neon_fixtures import NeonEnv, fork_at_current_lsn
#
# Test branching, when a transaction is in prepared state
#
def test_twophase(neon_simple_env: NeonEnv):
env = neon_simple_env
def test_twophase(neon_shared_env: NeonEnv):
env = neon_shared_env
endpoint = env.endpoints.create_start("main", config_lines=["max_prepared_transactions=5"])
conn = endpoint.connect()