Re: Test code is worth the space - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Test code is worth the space
Date
Msg-id CAM3SWZSr1SgJ_SDtO-R8xHfe6R7N=PrJgrbQnAOJm_Th_VESrw@mail.gmail.com
Whole thread Raw
In response to Re: Test code is worth the space  (Greg Stark <stark@mit.edu>)
Responses Re: Test code is worth the space  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Test code is worth the space  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Wed, Aug 12, 2015 at 10:46 AM, Greg Stark <stark@mit.edu> wrote:
> The only time I've seen pushback against tests is when the test author
> made valiant efforts to test every codepath and the expected output
> embeds the precise behaviour of the current code as "correct". Even
> when patches have extensive tests I don't recall seeing much pushback
> (though I've been having trouble keeping up with the list in recent
> months) if the tests are written in a way that they will only fail if
> there's a bug, even if behaviour changes in unrelated ways.

Really? I think Noah's description of how less testing is in effect
incentivized by committers is totally accurate. No patch author is
going to dig their heals in over the objections of a committer when
the complaint is about brevity of tests.

This resistance to adding tests seems quite short sighted to me,
especially when the concern is about queries that will each typically
take less than 1ms to execute. Like Noah, I think that it would be
very helpful to simply be more inclusive of additional tests that
don't increase test coverage by as much as each query in a minimal
subset. I am not at all convinced by arguments about the cost of
maintaining tests when a simple behavioral change occurs.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Test code is worth the space
Next
From: Alvaro Herrera
Date:
Subject: Re: Test code is worth the space