pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Gregory Smith <gregsmithpgsql@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: david.christensen@crunchydata.com
Subject: Re: pgbench logging broken by time logic changes
Date: Wed, 23 Jun 2021 09:08:35 -0400
Message-ID: <202106231308.lxr26cahwxuc@alvherre.pgsql> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2106231125540.1117163@pseudo>

On 2021-Jun-23, Fabien COELHO wrote:

> +# cool check that we are around 2 seconds
> +# The rate may results in an unlucky schedule which triggers
> +# an early exit, hence the loose bound.
> +#
> +# THIS TEST IS COMMENTED OUT BUT PLEASE LET IT THERE SO THAT
> +# IT CAN BE ENABLED EASILY.
> +#
> +## ok(1.5 < $delay && $delay < 2.5, "-T 2 run around 2 seconds");

I think you should use Test::More's "skip" for this, perhaps something
like this:

SKIP: {
   skip "This test is unreliable";

   # explain why
   ok(1.5 < $delay && $delay < 2.5, "-T 2 run around 2 seconds");
}

... or, actually, even better would be to use a TODO block, so that the
test is run and reports its status, but if it happens not to succeed it
will not cause the whole test to fail.  That way you'll accumulate some
evidence that may serve to improve the test in the future until it
works fully:

TODO: {
   local $TODO = "Ths test is unreliable";

   ok(1.5 < $delay && $delay < 2.5, "-T 2 run around 2 seconds");
}

-- 
Álvaro Herrera       Valdivia, Chile
"El Maquinismo fue proscrito so pena de cosquilleo hasta la muerte"
(Ijon Tichy en Viajes, Stanislaw Lem)





view thread (64+ messages)  latest in thread

Message-ID: <202106231308.lxr26cahwxuc@alvherre.pgsql>
Permalink:  ../202106231308.lxr26cahwxuc@alvherre.pgsql/
Also on:    postgresql.org/message-id/202106231308.lxr26cahwxuc@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, coelho@cri.ensmp.fr, michael@paquier.xyz, andrew@dunslane.net, thomas.munro@gmail.com, gregsmithpgsql@gmail.com, david.christensen@crunchydata.com
  Subject: Re: pgbench logging broken by time logic changes
  In-Reply-To: <202106231308.lxr26cahwxuc@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox