diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/postmaster/t/002_connection_limits.pl | 5 | ||||
| -rw-r--r-- | src/test/postmaster/t/003_start_stop.pl | 7 | ||||
| -rw-r--r-- | src/test/regress/nls.mk | 2 | ||||
| -rw-r--r-- | src/test/regress/po/meson.build | 2 | ||||
| -rw-r--r-- | src/test/regress/regress.c | 2 |
5 files changed, 14 insertions, 4 deletions
diff --git a/src/test/postmaster/t/002_connection_limits.pl b/src/test/postmaster/t/002_connection_limits.pl index 4a7fb16261f..2fc821ad0b4 100644 --- a/src/test/postmaster/t/002_connection_limits.pl +++ b/src/test/postmaster/t/002_connection_limits.pl @@ -74,6 +74,11 @@ sub connect_fails_wait ok(1, "$test_name: client backend process exited"); } +# Restart the server to ensure that any backends launched for the +# initialization steps are gone. Otherwise they could still be using +# up connection slots and mess with our expectations. +$node->restart; + my @sessions = (); my @raw_connections = (); diff --git a/src/test/postmaster/t/003_start_stop.pl b/src/test/postmaster/t/003_start_stop.pl index 58e7ba6cc42..25d6f667217 100644 --- a/src/test/postmaster/t/003_start_stop.pl +++ b/src/test/postmaster/t/003_start_stop.pl @@ -46,6 +46,11 @@ if (!$node->raw_connect_works()) plan skip_all => "this test requires working raw_connect()"; } +# Restart the server to ensure that the backend launched for +# raw_connect_works() is gone. Otherwise, it might free up the +# connection slot later, when we expect all the slots to be in use. +$node->restart; + my @raw_connections = (); # Open a lot of TCP (or Unix domain socket) connections to use up all @@ -81,7 +86,7 @@ for (my $i = 0; $i <= 20; $i++) # clients already" instead of "role does not exist" error. Test that # to ensure that we have used up all the slots. $node->connect_fails("dbname=postgres user=invalid_user", - "connect ", + "connection is rejected when all slots are in use", expected_stderr => qr/FATAL: sorry, too many clients already/); # Open one more connection, to really ensure that we have at least one diff --git a/src/test/regress/nls.mk b/src/test/regress/nls.mk index 43227c64f09..4051c965933 100644 --- a/src/test/regress/nls.mk +++ b/src/test/regress/nls.mk @@ -1,5 +1,5 @@ # src/test/regress/nls.mk -CATALOG_NAME = regress +CATALOG_NAME = postgresql-regress GETTEXT_FILES = regress.c GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) GETTEXT_FLAGS = $(BACKEND_COMMON_GETTEXT_FLAGS) diff --git a/src/test/regress/po/meson.build b/src/test/regress/po/meson.build index e9bd964aa7f..84b98a80df5 100644 --- a/src/test/regress/po/meson.build +++ b/src/test/regress/po/meson.build @@ -1,3 +1,3 @@ # Copyright (c) 2022-2025, PostgreSQL Global Development Group -nls_targets += [i18n.gettext('regress-' + pg_version_major.to_string())] +nls_targets += [i18n.gettext('postgresql-regress-' + pg_version_major.to_string())] diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c index acac34d40b9..b7a926c6f01 100644 --- a/src/test/regress/regress.c +++ b/src/test/regress/regress.c @@ -50,7 +50,7 @@ /* define our text domain for translations */ #undef TEXTDOMAIN -#define TEXTDOMAIN PG_TEXTDOMAIN("regress") +#define TEXTDOMAIN PG_TEXTDOMAIN("postgresql-regress") #define EXPECT_TRUE(expr) \ do { \ |
