Brittleness in regression test setup

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Brittleness in regression test setup
Дата
Msg-id 491D9935.9010200@gmx.net
обсуждение исходный текст
Ответы Re: Brittleness in regression test setup  (Andrew Dunstan <andrew@dunslane.net>)
Re: Brittleness in regression test setup  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Brittleness in regression test setup  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
I have experienced some brittleness in the regression test setup that 
causes the tests to be run against a different server instance or fail 
in confusing ways when you have multiple instances running.

For some historic reasons, I have my local scripts set up so that they 
build development instances using the hardcoded port 65432.  This will 
cause a temp install regression test to attempt to use port 565432 which 
will be rejected silently by pg_regress, which will then use its 
hardcoded default 65432 (no relation to my 65432).  If I have some other 
instance already running on 65432, then this will fail in non-reassuring 
ways such as

============== removing existing temp installation    ==============
============== creating temporary installation        ==============
============== initializing database system           ==============
============== starting postmaster                    ==============
running on port 65432 with pid 94178
============== creating database "regression"         ==============
ERROR:  database "regression" already exists

It evidently failed to realize that there is another postmaster already 
running at that port and just ran its test setup routines against that 
other instance.

If there is no database named "regression" on that other instance, then 
it will happily go ahead and run its full test suite against that other 
instance.

I see two problems here:

1) It fails to realize that it could not start its own temp instance 
when another instance is already running.

2) It ignores the port specification almost silently.

Since ports above 49152 are for private use, I think it is valid to 
configure test instances in that port range, but our regression test 
setup does not handle that port range very well.

So even if I configured my local scripts to use ports that are all 
different from each other and from 65432, this problem would still exist.

So, also,

2a) It has an undocumented hardcoded default port.

Any thoughts on how to fix this?


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: CREATE AGGREGATE disallows STYPE = internal
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: Simple postgresql.conf wizard