Skip to content

Commit 19408aa

Browse files
committed
Make subscription tests pass with log_error_verbosity=verbose
Recent additions to the subscription tests check for log entries, but fail to account for the possible presence of an SQL errror code, which happens if log_error_verbosity is set to 'verbose'. Add this into the regular expressions that are checked for.
1 parent 0d932a9 commit 19408aa

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/test/subscription/t/027_nosuperuser.pl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ sub grant_bypassrls
179179
publish_update("alice.unpartitioned", 5 => 9);
180180
expect_failure(
181181
"alice.unpartitioned", 2, 5, 7,
182-
qr/ERROR: permission denied for table unpartitioned/msi,
182+
qr/ERROR: ( [A-Z0-9]+:)? permission denied for table unpartitioned/msi,
183183
"non-superuser admin fails to replicate update");
184184
grant_superuser("regress_admin");
185185
expect_replication("alice.unpartitioned", 2, 7, 9,
@@ -214,7 +214,7 @@ sub grant_bypassrls
214214
3,
215215
7,
216216
11,
217-
qr/ERROR: permission denied for table unpartitioned/msi,
217+
qr/ERROR: ( [A-Z0-9]+:)? permission denied for table unpartitioned/msi,
218218
"non-superuser admin without SELECT privileges fails to replicate update"
219219
);
220220

@@ -262,7 +262,7 @@ sub grant_bypassrls
262262
2,
263263
11,
264264
13,
265-
qr/ERROR: "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
265+
qr/ERROR: ( [A-Z0-9]+:)? "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
266266
"non-superuser admin fails to replicate insert into rls enabled table");
267267
grant_superuser("regress_admin");
268268
expect_replication("alice.unpartitioned", 3, 11, 15,
@@ -276,7 +276,7 @@ sub grant_bypassrls
276276
3,
277277
11,
278278
15,
279-
qr/ERROR: "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
279+
qr/ERROR: ( [A-Z0-9]+:)? "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
280280
"non-superuser admin fails to replicate update into rls enabled unpartitioned"
281281
);
282282

@@ -291,7 +291,7 @@ sub grant_bypassrls
291291
3,
292292
13,
293293
17,
294-
qr/ERROR: "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
294+
qr/ERROR: ( [A-Z0-9]+:)? "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
295295
"non-superuser admin without bypassrls fails to replicate delete into rls enabled unpartitioned"
296296
);
297297
grant_bypassrls("regress_admin");

src/test/subscription/t/029_on_error.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ sub test_skip_lsn
4848
# Check the log to ensure that the transaction is skipped, and advance the
4949
# offset of the log file for the next test.
5050
$offset = $node_subscriber->wait_for_log(
51-
qr/LOG: done skipping logical replication transaction finished at $lsn/,
51+
qr/LOG: ( [A-Z0-9]+:)? done skipping logical replication transaction finished at $lsn/,
5252
$offset);
5353

5454
# Insert non-conflict data

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy