Re: Test code is worth the space

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Test code is worth the space
Дата
Msg-id 20150818131600.GB18054@fetter.org
обсуждение исходный текст
Ответ на Re: Test code is worth the space  (Greg Stark <stark@mit.edu>)
Ответы Re: Test code is worth the space
Список pgsql-hackers
On Tue, Aug 18, 2015 at 02:03:19PM +0100, Greg Stark wrote:
> On Tue, Aug 18, 2015 at 6:57 AM, Noah Misch <noah@leadboat.com> wrote:

> >> I suspect any effort to significantly improve Postgres test
> >> coverage is doomed until there's an alternative to pg_regress.
> >
> > There is the src/test/perl/TestLib.pm harness.
> 
> Sadly I think the test suite is only half the battle. The coding
> style of Postgres predates modern test suite systems and makes it
> hard to test. Most functions require a specific environment set up
> that would be laborious and difficult to do in any sane way. Even
> something as self-contained as tuplesort would be difficult to test
> without the whole operator class and syscache mechanisms initialized
> and populated. And that's an easy case, imagine trying to test
> individual functions in the planner without doing a complete planner
> run on a query.

I'm given to understand that this tight coupling is necessary for
performance.  Are you saying that it could be unwound, or that testing
strategies mostly need to take it into account, or...?

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Test code is worth the space
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Autonomous Transaction is back