mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 01:42:55 +00:00
Fix test
This commit is contained in:
@@ -13,7 +13,9 @@ from fixtures.neon_fixtures import NeonEnv, PgBin
|
||||
def test_pageserver_restarts_under_worload(neon_simple_env: NeonEnv, pg_bin: PgBin):
|
||||
env = neon_simple_env
|
||||
env.neon_cli.create_branch("test_pageserver_restarts")
|
||||
endpoint = env.endpoints.create_start("test_pageserver_restarts", config_lines=["effective_io_concurrency=100"])
|
||||
endpoint = env.endpoints.create_start(
|
||||
"test_pageserver_restarts", config_lines=["effective_io_concurrency=100"]
|
||||
)
|
||||
|
||||
n_restarts = 100
|
||||
scale = 10
|
||||
@@ -21,7 +23,7 @@ def test_pageserver_restarts_under_worload(neon_simple_env: NeonEnv, pg_bin: PgB
|
||||
def run_pgbench(connstr: str):
|
||||
log.info(f"Start a pgbench workload on pg {connstr}")
|
||||
pg_bin.run_capture(["pgbench", "-i", f"-s{scale}", connstr])
|
||||
pg_bin.run_capture(["pgbench", f"-c 10 -f select.sql -T{n_restarts}", connstr])
|
||||
pg_bin.run_capture(["pgbench", "-c", "10", "-f", "select.sql", f"-T{n_restarts}", connstr])
|
||||
|
||||
thread = threading.Thread(target=run_pgbench, args=(endpoint.connstr(),), daemon=True)
|
||||
thread.start()
|
||||
|
||||
Reference in New Issue
Block a user