Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions

Sadhuprasad Patro <b.sadhu@gmail.com>

From: Sadhuprasad Patro <b.sadhu@gmail.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Michael Paquier <michael@paquier.xyz>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-15T12:36:47Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Improve TAP tests by replacing ok() with better Test::More functions

  2. Fix matching check in recovery test 042_low_level_backup

  3. pg_createsubscriber: Fix matching check in TAP test

On Wed, Oct 15, 2025 at 2:25 AM Andrew Dunstan <andrew@dunslane.net> wrote:

>
> On 2025-10-14 Tu 4:01 AM, Michael Paquier wrote:
> > On Fri, Oct 10, 2025 at 09:33:10AM -0400, Andrew Dunstan wrote:
> >> Great, I think this is a definite improvement. I saw someone recently
> >> complaining about this overuse of ok(), so thanks for doing the work to
> >> improve it.
> > Yeah, it's really cool to see someone step up and do all this leg
> > work for the existing code.  I have not checked the patch in details
> > or if there are missing spots.  Andrew, is that something you are
> > planning to do?
>
>
>
> I believe Sadhuprasad used this recipe to find these:
>
>
>    find src contrib -type f -name '*.p[lm]' -print | \
>        xargs grep -P '\bok[(].*[~=]'
>
>
> Maybe that would miss a few, but I bet not too many.
>
>
> cheers
>
>
> andrew
>
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com
>
>
Yes.. I hv used the same you mentioned Andrew...

-- 
thank u
               SADHU PRASAD