Re: [HACKERS] pgbench tap tests & minor fixes. - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] pgbench tap tests & minor fixes.
Date
Msg-id alpine.DEB.2.20.1709050845280.6547@lancre
Whole thread Raw
In response to Re: [HACKERS] pgbench tap tests & minor fixes.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] pgbench tap tests & minor fixes.
List pgsql-hackers
Hello Tom,

>>> sub pgbench($$$$$)
>
> My concern is basically about maintaining coding style consistency.

Yes, I'm fine with that. I have removed it in the v12 patch.

> reasons why it's not like that already.  I do have to say that many of
> the examples I've seen look more like line noise than readable code.

Sure. I agree that the readability is debatable. The usefulness is only 
that an error is raised at "compile" time instead of having a strange 
behavior at runtime.

>> I run the test, figure out the number it found in the resulting
>> error message, and update the number in the source.
>
> Yeah, but then what error is all that work protecting you from?

I'm not sure I understand your point. I agree that Perl doing the counting 
may hide issues. Now it is more of an incremental thing, if a test is 
added the counter is upgraded accordingly, and the local consistency can 
be checked.

Anyway, as some tests may have to be skipped on some platforms, it seems 
that the done_testing approach is sounder. The v12 patch uses that.

Thanks for your comments.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: [HACKERS] Copyright in partition.h and partition.c
Next
From: Beena Emerson
Date:
Subject: Re: [HACKERS] Default Partition for Range