Skip to content

Commit

Permalink
Fix flukyness of test_physical_and_logical_replicaiton.py (#10176)
Browse files Browse the repository at this point in the history
## Problem

See #10037
test_physical_and_logical_replication.py sometimes failed.

## Summary of changes

Add `wait_replica_caughtup` to wait for replica sync

Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech>
  • Loading branch information
knizhnik and Konstantin Knizhnik authored Dec 18, 2024
1 parent 6d3e809 commit 61fcf64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test_runner/regress/test_physical_and_logical_replicaiton.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import time

from fixtures.neon_fixtures import NeonEnv, logical_replication_sync
from fixtures.neon_fixtures import NeonEnv, logical_replication_sync, wait_replica_caughtup


def test_physical_and_logical_replication_slot_not_copied(neon_simple_env: NeonEnv, vanilla_pg):
Expand Down Expand Up @@ -38,6 +38,8 @@ def test_physical_and_logical_replication_slot_not_copied(neon_simple_env: NeonE
for pk in range(n_records):
p_cur.execute("insert into t (pk) values (%s)", (pk,))

wait_replica_caughtup(primary, secondary)

s_cur.execute("select count(*) from t")
assert s_cur.fetchall()[0][0] == n_records

Expand Down

1 comment on commit 61fcf64

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7245 tests run: 6935 passed, 2 failed, 308 skipped (full report)


Failures on Postgres 16

  • test_ingest_logical_message[github-actions-selfhosted-fsync-131072]: release-x86-64
  • test_storage_controller_many_tenants[github-actions-selfhosted]: release-x86-64
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_ingest_logical_message[release-pg16-github-actions-selfhosted-fsync-131072] or test_storage_controller_many_tenants[release-pg16-github-actions-selfhosted]"
Flaky tests (1)

Postgres 17

  • test_physical_replication_config_mismatch_too_many_known_xids: release-arm64

Code coverage* (full report)

  • functions: 31.2% (8394 of 26865 functions)
  • lines: 48.0% (66638 of 138941 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
61fcf64 at 2024-12-18T21:32:43.933Z :recycle:

Please sign in to comment.