Skip to content

Commit

Permalink
Work around issue #9079
Browse files Browse the repository at this point in the history
  • Loading branch information
hlinnaka committed Sep 20, 2024
1 parent 2202384 commit c42856d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test_runner/regress/test_twophase.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
PgBin,
fork_at_current_lsn,
import_timeline_from_vanilla_postgres,
wait_for_wal_insert_lsn,
)


Expand Down Expand Up @@ -146,13 +147,17 @@ def test_twophase_at_wal_segment_start(neon_simple_env: NeonEnv):
very first page of a WAL segment and the server was started up at that first page.
"""
env = neon_simple_env
env.neon_cli.create_branch("test_twophase", "main")
timeline_id = env.neon_cli.create_branch("test_twophase", "main")

endpoint = env.endpoints.create_start(
"test_twophase", config_lines=["max_prepared_transactions=5"]
)
endpoint.safe_psql("SELECT pg_switch_wal()")

# to avoid hitting https://github.com/neondatabase/neon/issues/9079, wait for the
# WAL to reach the pageserver.
wait_for_wal_insert_lsn(env, endpoint, env.initial_tenant, timeline_id)

endpoint.stop_and_destroy()

twophase_test_on_timeline(env)

0 comments on commit c42856d

Please sign in to comment.