index 4a7fb16261f86e027a1b99baafa9f191a80561f4..2fc821ad0b477cedaf2da8556e004e15a54906e4 100644 (file)
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 = ();
index 58e7ba6cc425ebd58a69e602dbf45e4c27fa276a..25d6f66721777c810877f715e305aeabe4025603 100644 (file)
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
# 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