git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: d82e7c8) | patch
Adjust timestamp regression tests to prevent two low-probability failure
2008年5月25日 21:51:00 +0000 (21:51 +0000)
2008年5月25日 21:51:00 +0000 (21:51 +0000)
commit 8c2ac75c5cdb68aa240a8866dc828e14ee2b5e03
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.
src/test/regress/expected/timestamp.out diff | blob | blame | history
src/test/regress/expected/timestamptz.out diff | blob | blame | history
src/test/regress/sql/timestamp.sql diff | blob | blame | history
src/test/regress/sql/timestamptz.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /