Add hacky solution

This commit is contained in:
Bojan Serafimov
2022-08-12 09:05:51 -04:00
parent 414279726d
commit bd33ea9fae
2 changed files with 4 additions and 3 deletions

View File

@@ -7,9 +7,6 @@ from fixtures.log_helper import log
def test_fixture_restart(neon_env_builder: NeonEnvBuilder):
env = neon_env_builder.init_start()
env.neon_cli.create_branch('test_fixture_restart')
pg = env.postgres.create_start('test_fixture_restart')
for i in range(3):
env.pageserver.stop()
env.pageserver.start()

View File

@@ -1495,6 +1495,10 @@ class NeonPageserver(PgProtocol):
"""
if self.running:
self.env.neon_cli.pageserver_stop(immediate)
# HACK This fixes https://github.com/neondatabase/neon/issues/2247
# in most cases, but we should probably wait on some event rather
# than wait 0.1 seconds.
time.sleep(0.1)
self.running = False
return self