Skip site navigation (1) Skip section navigation (2)

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

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Adjust timestamp regression tests to prevent two low-probability
Date: 2008-05-25 21:51:23
Message-ID: 20080525215123.DC834754C54@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
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)

pgsql-committers by date

Next:From: Tom LaneDate: 2008-05-25 21:51:30
Subject: pgsql: Adjust timestamp regression tests to prevent two low-probability
Previous:From: Tom LaneDate: 2008-05-25 21:51:17
Subject: pgsql: Adjust timestamp regression tests to prevent two low-probability

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group