Re: pgbench logging broken by time logic changes
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Paquier <michael@paquier.xyz>, Andrew Dunstan <andrew@dunslane.net>, Thomas Munro <thomas.munro@gmail.com>, Gregory Smith <gregsmithpgsql@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, david.christensen@crunchydata.com
Date: 2021-06-23T13:08:35Z
Lists: pgsql-hackers
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)
Commits
-
Fix pgbench timestamp bugs.
- 5614a0f78eaa 14.0 landed
- 0e39a608ed55 15.0 landed
-
Fix pattern matching logic for logs in TAP tests of pgbench
- 0efd2a1a66dd 11.13 landed
- 79ff96aa9d9a 12.8 landed
- 7a9eaf111ac0 13.4 landed
- c13585fe9e55 14.0 landed
-
pgbench: Improve time logic.
- 547f04e7348b 14.0 cited
-
pgbench: Synchronize client threads.
- aeb57af8e640 14.0 cited
-
pgbench: refactor handling of stats tracking
- b60376649600 9.6.0 cited