Re: Add isolation test template in injection_points for wait/wakeup/detach

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-29T08:20:42Z
Lists: pgsql-hackers
On Tue, Oct 29, 2024 at 07:59:31AM +0000, Bertrand Drouvot wrote:
> On Tue, Oct 29, 2024 at 01:12:25PM +0900, Michael Paquier wrote:
>> Under a wait of N seconds,
>> we could still have environments where the wait() could remain stuck
>> more than N seconds between the moment the condition variable is woken
>> up and the result of the wait() is reported back to the client.  And
>> hardcoded sleeps make the test slower even on fast machines.
> 
> Yeah, not ideal so better to keep the test as it is currently (after your
> refactoring).

Backpedalling a bit on that..  Perhaps it would be useful to keep the 
permutation as disabled in the test and to update the comment in
basic.spec to tell that this had better be avoided when implementing a
test if the timing of the return value of a SQL wait() cannot be
strictly controlled?  And also say that putting the wakeup() should be
last for simple permutations?  The point of this spec is also to
document some good and bad practices.
--
Michael

Commits

  1. injection_points: Tweak more permutation in isolation test "basic"

  2. injection_points: Re-enable permutation in isolation test "basic"

  3. injection_points: Improve comment about disabled isolation permutation

  4. injection_points: Disable one permutation in isolation test "basic"

  5. injection_points: Add basic isolation test