pgsql: Avoid low-probability regression test failures in timestamp[tz]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid low-probability regression test failures in timestamp[tz]
Date: 2019-12-22 23:00:59
Message-ID: E1ijADb-00082V-2T@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid low-probability regression test failures in timestamp[tz] tests.

If the first transaction block in these tests were entered exactly
at midnight (California time), they'd report a bogus failure due
to 'now' and 'midnight' having the same values. Commit 8c2ac75c5
had dismissed this as being of negligible probability, but we've
now seen it happen in the buildfarm, so let's prevent it. We can
get pretty much the same test coverage without an it's-not-midnight
assumption by moving the does-'now'-work cases into their own test step.

While here, apply commit 47169c255's s/DELETE/TRUNCATE/ change to
timestamptz as well as timestamp (not sure why that didn't
occur to me at the time; the risk of failure is the same).

Back-patch to all supported branches, since the main point is
to get rid of potential buildfarm failures.

Discussion: https://postgr.es/m/14821.1577031117@sss.pgh.pa.us

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e1c056cc4d7bcc0dfe8a3808550e7b7f73b64643

Modified Files
--------------
src/test/regress/expected/timestamp.out | 37 +++++++++++++---------------
src/test/regress/expected/timestamptz.out | 41 +++++++++++++++++++------------
src/test/regress/sql/timestamp.sql | 20 +++++++--------
src/test/regress/sql/timestamptz.sql | 24 +++++++++---------
4 files changed, 63 insertions(+), 59 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-12-23 01:52:04 pgsql: Combine initdb tests that successfully create a data directory.
Previous Message Peter Eisentraut 2019-12-22 22:21:53 pgsql: Fix compiler warning for ppoll() on Cygwin