Skip to content

Commit d1bdab2

Browse files
committed
test_shm_mq: Improve regression tests.
Per discussion with Tom Lane.
1 parent f88d4cf commit d1bdab2

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

contrib/test_shm_mq/expected/test_shm_mq.out

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,31 @@ CREATE EXTENSION test_shm_mq;
44
-- the operations complete without crashing or hanging and that none of their
55
-- internal sanity tests fail.
66
--
7-
SELECT test_shm_mq(32768, (select string_agg(chr(32+(random()*96)::int), '') from generate_series(1,400)), 10000, 1);
7+
SELECT test_shm_mq(1024, '', 2000, 1);
88
test_shm_mq
99
-------------
1010

1111
(1 row)
1212

13-
SELECT test_shm_mq_pipelined(16384, (select string_agg(chr(32+(random()*96)::int), '') from generate_series(1,270000)), 200, 3);
13+
SELECT test_shm_mq(1024, 'a', 2001, 1);
14+
test_shm_mq
15+
-------------
16+
17+
(1 row)
18+
19+
SELECT test_shm_mq(32768, (select string_agg(chr(32+(random()*95)::int), '') from generate_series(1,(100+900*random())::int)), 10000, 1);
20+
test_shm_mq
21+
-------------
22+
23+
(1 row)
24+
25+
SELECT test_shm_mq(100, (select string_agg(chr(32+(random()*95)::int), '') from generate_series(1,(100+200*random())::int)), 10000, 1);
26+
test_shm_mq
27+
-------------
28+
29+
(1 row)
30+
31+
SELECT test_shm_mq_pipelined(16384, (select string_agg(chr(32+(random()*95)::int), '') from generate_series(1,270000)), 200, 3);
1432
test_shm_mq_pipelined
1533
-----------------------
1634

contrib/test_shm_mq/sql/test_shm_mq.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ CREATE EXTENSION test_shm_mq;
55
-- the operations complete without crashing or hanging and that none of their
66
-- internal sanity tests fail.
77
--
8-
SELECT test_shm_mq(32768, (select string_agg(chr(32+(random()*96)::int), '') from generate_series(1,400)), 10000, 1);
9-
SELECT test_shm_mq_pipelined(16384, (select string_agg(chr(32+(random()*96)::int), '') from generate_series(1,270000)), 200, 3);
8+
SELECT test_shm_mq(1024, '', 2000, 1);
9+
SELECT test_shm_mq(1024, 'a', 2001, 1);
10+
SELECT test_shm_mq(32768, (select string_agg(chr(32+(random()*95)::int), '') from generate_series(1,(100+900*random())::int)), 10000, 1);
11+
SELECT test_shm_mq(100, (select string_agg(chr(32+(random()*95)::int), '') from generate_series(1,(100+200*random())::int)), 10000, 1);
12+
SELECT test_shm_mq_pipelined(16384, (select string_agg(chr(32+(random()*95)::int), '') from generate_series(1,270000)), 200, 3);

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