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

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Adjust timestamp regression tests to prevent two low-probability
Дата
Msg-id 20080525215117.D4FF9754C54@cvs.postgresql.org
обсуждение исходный текст
Список 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_2_STABLE

Modified Files:
--------------
    pgsql/src/test/regress/expected:
        timestamp.out (r1.31.2.1 -> r1.31.2.2)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/timestamp.out?r1=1.31.2.1&r2=1.31.2.2)
        timestamptz.out (r1.21.2.2 -> r1.21.2.3)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/timestamptz.out?r1=1.21.2.2&r2=1.21.2.3)
    pgsql/src/test/regress/sql:
        timestamp.sql (r1.17 -> r1.17.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/timestamp.sql?r1=1.17&r2=1.17.2.1)
        timestamptz.sql (r1.10.2.1 -> r1.10.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/timestamptz.sql?r1=1.10.2.1&r2=1.10.2.2)

В списке pgsql-committers по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Adjust timestamp regression tests to prevent two low-probability
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Adjust timestamp regression tests to prevent two low-probability