aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/modules/worker_spi/t/001_worker_spi.pl6
-rw-r--r--src/test/regress/expected/rules.out4
-rw-r--r--src/test/regress/expected/sysviews.out16
-rw-r--r--src/test/regress/sql/sysviews.sql4
4 files changed, 30 insertions, 0 deletions
diff --git a/src/test/modules/worker_spi/t/001_worker_spi.pl b/src/test/modules/worker_spi/t/001_worker_spi.pl
index 26b8a49beca..2965acd7890 100644
--- a/src/test/modules/worker_spi/t/001_worker_spi.pl
+++ b/src/test/modules/worker_spi/t/001_worker_spi.pl
@@ -47,6 +47,12 @@ $result = $node->poll_query_until(
is($result, 1,
'dynamic bgworker has reported "worker_spi_main" as wait event');
+# Check the wait event used by the dynamic bgworker appears in pg_wait_events
+$result = $node->safe_psql('postgres',
+ q[SELECT count(*) > 0 from pg_wait_events where type = 'Extension' and name = 'worker_spi_main';]
+);
+is($result, 't', '"worker_spi_main" is reported in pg_wait_events');
+
note "testing bgworkers loaded with shared_preload_libraries";
# Create the database first so as the workers can connect to it when
diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out
index e07afcd4aa6..5058be5411a 100644
--- a/src/test/regress/expected/rules.out
+++ b/src/test/regress/expected/rules.out
@@ -2631,6 +2631,10 @@ pg_views| SELECT n.nspname AS schemaname,
FROM (pg_class c
LEFT JOIN pg_namespace n ON ((n.oid = c.relnamespace)))
WHERE (c.relkind = 'v'::"char");
+pg_wait_events| SELECT type,
+ name,
+ description
+ FROM pg_get_wait_events() pg_get_wait_events(type, name, description);
SELECT tablename, rulename, definition FROM pg_rules
WHERE schemaname = 'pg_catalog'
ORDER BY tablename, rulename;
diff --git a/src/test/regress/expected/sysviews.out b/src/test/regress/expected/sysviews.out
index 001c6e7eb9d..aae5d51e1c9 100644
--- a/src/test/regress/expected/sysviews.out
+++ b/src/test/regress/expected/sysviews.out
@@ -134,6 +134,22 @@ select name, setting from pg_settings where name like 'enable%';
enable_tidscan | on
(21 rows)
+-- There are always wait event descriptions for various types.
+select type, count(*) > 0 as ok FROM pg_wait_events
+ group by type order by type COLLATE "C";
+ type | ok
+-----------+----
+ Activity | t
+ BufferPin | t
+ Client | t
+ Extension | t
+ IO | t
+ IPC | t
+ LWLock | t
+ Lock | t
+ Timeout | t
+(9 rows)
+
-- Test that the pg_timezone_names and pg_timezone_abbrevs views are
-- more-or-less working. We can't test their contents in any great detail
-- without the outputs changing anytime IANA updates the underlying data,
diff --git a/src/test/regress/sql/sysviews.sql b/src/test/regress/sql/sysviews.sql
index 351e469c77b..6b4e24601d9 100644
--- a/src/test/regress/sql/sysviews.sql
+++ b/src/test/regress/sql/sysviews.sql
@@ -55,6 +55,10 @@ select count(*) = 0 as ok from pg_stat_wal_receiver;
-- a regression test run.
select name, setting from pg_settings where name like 'enable%';
+-- There are always wait event descriptions for various types.
+select type, count(*) > 0 as ok FROM pg_wait_events
+ group by type order by type COLLATE "C";
+
-- Test that the pg_timezone_names and pg_timezone_abbrevs views are
-- more-or-less working. We can't test their contents in any great detail
-- without the outputs changing anytime IANA updates the underlying data,