mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
pg_createsubscriber: Fix matching check in TAP test
040_pg_createsubscriber has been calling safe_psql(), that returns the
result of a SQL query, with ok() without checking the result generated
(in this case 't', for a number of publications).
The outcome of the tests is currently not impacted by this change.
However, it could be possible that the test fails to detect future
issues if the query results become different.
The test is rewritten so as the number of publications is checked. This
is not the fix suggested originally by the author, but this is more
reliable in the long run.
Oversight in e5aeed4b80
.
Author: Sadhuprasad Patro <b.sadhu@gmail.com>
Discussion: https://postgr.es/m/CAFF0-CHhwNx_Cv2uy7tKjODUbeOgPrJpW4Rpf1jqB16_1bU2sg@mail.gmail.com
Backpatch-through: 18
This commit is contained in:
@@ -341,8 +341,8 @@ $node_p->safe_psql(
|
|||||||
|
|
||||||
$node_p->wait_for_replay_catchup($node_s);
|
$node_p->wait_for_replay_catchup($node_s);
|
||||||
|
|
||||||
ok($node_s->safe_psql($db1, "SELECT COUNT(*) = 2 FROM pg_publication"),
|
is($node_s->safe_psql($db1, "SELECT COUNT(*) FROM pg_publication"),
|
||||||
'two pre-existing publications on subscriber');
|
'2', 'two pre-existing publications on subscriber');
|
||||||
|
|
||||||
$node_s->stop;
|
$node_s->stop;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user