This commit is contained in:
Bojan Serafimov
2022-02-22 12:59:49 -05:00
parent d32085cf1b
commit 99db785d5a
2 changed files with 2 additions and 9 deletions

View File

@@ -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;")

View File

@@ -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