From 99db785d5a2cd82003b89efd88106e530eebe20e Mon Sep 17 00:00:00 2001 From: Bojan Serafimov Date: Tue, 22 Feb 2022 12:59:49 -0500 Subject: [PATCH] Simplify --- test_runner/batch_others/test_proxy.py | 2 +- test_runner/fixtures/zenith_fixtures.py | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/test_runner/batch_others/test_proxy.py b/test_runner/batch_others/test_proxy.py index 510d1fb07c..d5b267273b 100644 --- a/test_runner/batch_others/test_proxy.py +++ b/test_runner/batch_others/test_proxy.py @@ -1,4 +1,4 @@ -def test_proxy_select_1(vanilla_pg_1mb, static_proxy): +def test_proxy_select_1(static_proxy): static_proxy.safe_psql("select 1;") diff --git a/test_runner/fixtures/zenith_fixtures.py b/test_runner/fixtures/zenith_fixtures.py index 1f35b7979a..3d96ced107 100644 --- a/test_runner/fixtures/zenith_fixtures.py +++ b/test_runner/fixtures/zenith_fixtures.py @@ -1190,7 +1190,6 @@ class ZenithProxy(PgProtocol): def stop(self) -> None: assert self.running - # print("PID: ", self.popen.pid) self.running = False # NOTE the process will die when we're done with tests anyway, because @@ -1205,17 +1204,11 @@ class ZenithProxy(PgProtocol): self.stop() -# TODO try to make this shared @pytest.fixture(scope='function') -def vanilla_pg_1mb(vanilla_pg) -> VanillaPostgres: - vanilla_pg.configure(['shared_buffers=1MB']) +def static_proxy(vanilla_pg) -> Iterator[ZenithProxy]: vanilla_pg.start() vanilla_pg.safe_psql("create user pytest with password 'pytest';") - return vanilla_pg - -@pytest.fixture(scope='session') -def static_proxy() -> Iterator[ZenithProxy]: with ZenithProxy(4432) as proxy: proxy.start_static() yield proxy