From 32f4a56327bc9da697706839ed4836b2a00a408f Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Thu, 1 Feb 2024 16:31:43 +0200 Subject: [PATCH] Fix catching error in test_replication_lag --- safekeeper/src/send_wal.rs | 4 ++++ test_runner/regress/test_replication_lag.py | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/safekeeper/src/send_wal.rs b/safekeeper/src/send_wal.rs index 33f5e598bc..430c11b048 100644 --- a/safekeeper/src/send_wal.rs +++ b/safekeeper/src/send_wal.rs @@ -167,6 +167,10 @@ impl WalSenders { fn record_standby_reply(self: &Arc, id: WalSenderId, reply: &StandbyReply) { let mut shared = self.mutex.lock(); let slot = shared.get_slot_mut(id); + info!( + "Record standby reply: ts={} apply_lsn={}", + reply.reply_ts, reply.apply_lsn + ); match &mut slot.feedback { ReplicationFeedback::Standby(sf) => sf.reply = *reply, ReplicationFeedback::Pageserver(_) => { diff --git a/test_runner/regress/test_replication_lag.py b/test_runner/regress/test_replication_lag.py index 4ca7b63435..d9c85a6db0 100644 --- a/test_runner/regress/test_replication_lag.py +++ b/test_runner/regress/test_replication_lag.py @@ -50,9 +50,7 @@ def test_replication_lag(neon_simple_env: NeonEnv, pg_bin: PgBin): ) except Exception as error: print(f"Query failed: {error}") - if not str(error).startswith( - "canceling statement due to conflict with recovery" - ): + if "canceling statement due to conflict with recovery" not in str(error): raise t.join()