Fix test_prepare_snapshot.

It should checkpoint pageserver after waiting for all data arrival, not before.
This commit is contained in:
Arseny Sher
2022-10-28 21:44:47 +04:00
committed by Arseny Sher
parent 7481fb082c
commit 596d622a82

View File

@@ -259,8 +259,8 @@ def test_prepare_snapshot(neon_env_builder: NeonEnvBuilder, pg_bin: PgBin, test_
pageserver_http = env.pageserver.http_client()
lsn = Lsn(pg.safe_psql("SELECT pg_current_wal_flush_lsn()")[0][0])
pageserver_http.timeline_checkpoint(tenant_id, timeline_id)
wait_for_last_record_lsn(pageserver_http, tenant_id, timeline_id, lsn)
pageserver_http.timeline_checkpoint(tenant_id, timeline_id)
wait_for_upload(pageserver_http, tenant_id, timeline_id, lsn)
env.postgres.stop_all()