Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7e60e67

Browse files
committed
Tighten test in contrib/bloom/t/001_wal.pl.
Make bloom WAL test compare psql output text, not just result codes;this was evidently the intent all along, but it was mis-coded.In passing, make sure we will notice any failure in setup steps.Alexander Korotkov, reviewed by Michael Paquier and Masahiko SawadaDiscussion:https://postgr.es/m/CAPpHfdtohPdQ9rc5mdWjxq+3VsBNw534KV_5O65dTQrSdVJNgw@mail.gmail.com
1 parentb9941d3 commit7e60e67

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎contrib/bloom/t/001_wal.pl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ sub test_index_replay
3232
);
3333

3434
# Run test queries and compare their result
35-
my$master_result =$node_master->psql("postgres",$queries);
36-
my$standby_result =$node_standby->psql("postgres",$queries);
35+
my$master_result =$node_master->safe_psql("postgres",$queries);
36+
my$standby_result =$node_standby->safe_psql("postgres",$queries);
3737

3838
is($master_result,$standby_result,"$test_name: query result matches");
3939
}
@@ -54,12 +54,12 @@ sub test_index_replay
5454
$node_standby->start;
5555

5656
# Create some bloom index on master
57-
$node_master->psql("postgres","CREATE EXTENSION bloom;");
58-
$node_master->psql("postgres","CREATE TABLE tst (i int4, t text);");
59-
$node_master->psql("postgres",
57+
$node_master->safe_psql("postgres","CREATE EXTENSION bloom;");
58+
$node_master->safe_psql("postgres","CREATE TABLE tst (i int4, t text);");
59+
$node_master->safe_psql("postgres",
6060
"INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,100000) i;"
6161
);
62-
$node_master->psql("postgres",
62+
$node_master->safe_psql("postgres",
6363
"CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (col1 = 3);");
6464

6565
# Test that queries give same result
@@ -68,12 +68,12 @@ sub test_index_replay
6868
# Run 10 cycles of table modification. Run test queries after each modification.
6969
formy$i (1 .. 10)
7070
{
71-
$node_master->psql("postgres","DELETE FROM tst WHERE i =$i;");
71+
$node_master->safe_psql("postgres","DELETE FROM tst WHERE i =$i;");
7272
test_index_replay("delete$i");
73-
$node_master->psql("postgres","VACUUM tst;");
73+
$node_master->safe_psql("postgres","VACUUM tst;");
7474
test_index_replay("vacuum$i");
7575
my ($start,$end) = (100001 + ($i - 1) * 10000, 100000 +$i * 10000);
76-
$node_master->psql("postgres",
76+
$node_master->safe_psql("postgres",
7777
"INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series($start,$end) i;"
7878
);
7979
test_index_replay("insert$i");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp