postgresql/src/test
Andres Freund 32914d900f Fix race condition in stats.sql added in 5264add784
Very occasionally the stats test failed due to the number of sessions not
being updated yet. Likely this requires that there is contention on the
database's stats entry. Solve this by forcing pending stats to be flushed
before fetching the stats.

I verified that there are no other test failures after making
pgstat_report_stat() only flush stats when force = true.

Per message from Tom Lane and buildfarm member crake.

Discussion: https://postgr.es/m/3428246.1663271992@sss.pgh.pa.us
Backpatch: 15-, where 5264add784 added the test
2022-09-16 11:28:20 -07:00
..
authentication Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
examples Remove configure probe for sys/select.h. 2022-08-14 00:09:47 +12:00
icu Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
isolation Add subxid-overflow "isolation" test 2022-09-14 16:10:01 +02:00
kerberos Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
ldap Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
locale pycodestyle (PEP 8) cleanup in Python scripts 2022-03-09 10:54:20 +01:00
mb
modules Detect format-string mistakes in the libpq_pipeline test module. 2022-09-15 17:17:53 -04:00
perl Bump minimum Perl version to 5.14 2022-09-14 12:37:04 +07:00
recovery Update another comment still referring to pg_start/stop_backup() 2022-08-25 15:04:38 +02:00
regress Fix race condition in stats.sql added in 5264add784 2022-09-16 11:28:20 -07:00
ssl Don't reflect unescaped cert data to the logs 2022-09-13 16:10:50 +02:00
subscription Message wording improvements 2022-09-16 16:39:26 +02:00
Makefile Add option to use ICU as global locale provider 2022-03-17 11:13:16 +01:00
README Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00

PostgreSQL tests
================

This directory contains a variety of test infrastructure as well as some of the
tests in PostgreSQL. Not all tests are here -- in particular, there are more in
individual contrib/ modules and in src/bin.

Not all these tests get run by "make check". Check src/test/Makefile to see
which tests get run automatically.

authentication/
  Tests for authentication (but see also below)

examples/
  Demonstration programs for libpq that double as regression tests via
  "make check"

isolation/
  Tests for concurrent behavior at the SQL level

kerberos/
  Tests for Kerberos/GSSAPI authentication and encryption

ldap/
  Tests for LDAP-based authentication

locale/
  Sanity checks for locale data, encodings, etc

mb/
  Tests for multibyte encoding (UTF-8) support

modules/
  Extensions used only or mainly for test purposes, generally not suitable
  for installing in production databases

perl/
  Infrastructure for Perl-based TAP tests

recovery/
  Test suite for recovery and replication

regress/
  PostgreSQL's main regression test suite, pg_regress

ssl/
  Tests to exercise and verify SSL certificate handling

subscription/
  Tests for logical replication