Sunday, May 25, 2008

[COMMITTERS] pgsql: Adjust timestamp regression tests to prevent two low-probability

Log Message:
-----------
Adjust timestamp regression tests to prevent two low-probability failure
cases. Recent buildfarm experience shows that it is sometimes possible
to execute several SQL commands in less time than the granularity of
Windows' not-very-high-resolution gettimeofday(), leading to a failure
because the tests expect the value of now() to change and it doesn't.
Also, it was recognized some time ago that the same area of the tests
could fail if local midnight passes between the insertion and the checking
of the values for 'yesterday', 'tomorrow', etc. Clean all this up per
ideas from myself and Greg Stark.

There remains a window for failure if the transaction block is entered
exactly at local midnight (so that 'now' and 'today' have the same value),
but that seems low-probability enough to live with.

Since the point of this change is mostly to eliminate buildfarm noise,
back-patch to all versions we are still actively testing.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
pgsql/src/test/regress/expected:
timestamp.out (r1.28 -> r1.28.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/timestamp.out?r1=1.28&r2=1.28.2.1)
timestamptz.out (r1.18 -> r1.18.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/timestamptz.out?r1=1.18&r2=1.18.2.1)
pgsql/src/test/regress/sql:
timestamp.sql (r1.14 -> r1.14.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/timestamp.sql?r1=1.14&r2=1.14.2.1)
timestamptz.sql (r1.7 -> r1.7.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/timestamptz.sql?r1=1.7&r2=1.7.2.1)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

No comments: