Re: Regression tests failing if not launched on db "regression"

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Regression tests failing if not launched on db "regression"
Date: 2013-12-06 04:16:05
Message-ID: CAB7nPqQZD47k=8ywUVtcUwx1kJ31O2Qcngd=L7mVy6jXNC=DUA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 6, 2013 at 12:02 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On Thu, 2013-12-05 at 17:12 +0900, Michael Paquier wrote:
>> IMHO, the regression test suite would gain in consistency and
>> portability if we do not refer to data that is database-dependent.
>
> I once did some similar fixes (e3d9dceef62e072cf9a433ae6c74a1c5a10d94d3)
> but then didn't pursue it any longer, because it would restrict what we
> could actually test. I don't remember what I was trying to do there,
> but why do you need to run the tests in a different database?
I don't know, but by looking at this test code I could guess that
using a custom database name (that also changed depending on the
environment used) made errors easier to track. So, I just went ahead,
cleaned up our code to use "regression" and made things a bit smarter
for the environment information.

For the documentation patch, I propose the attached to avoid future
confusions. Comments? It might make sense to back-patch as well.

Also... An advice for the archives and other people here: never update
test output dynamically and use the existing ones. I wouldn't even
recommend adding new outputs to the existing tests except if you want
to make your maintenance a pain as you would need to track new tests
and update accordingly. Even better, submit patches if new outputs
make sense, or write new tests and break things independently as much
as you want.
--
Michael

Attachment Content-Type Size
20131206_doc_regress_restriction.patch text/x-diff 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2013-12-06 04:50:50 Re: dblink performance regression
Previous Message Fabrízio de Royes Mello 2013-12-06 04:07:15 Re: Time-Delayed Standbys