diff options
author | Michael Paquier | 2025-02-07 04:58:22 +0000 |
---|---|---|
committer | Michael Paquier | 2025-02-07 04:58:22 +0000 |
commit | 926c7fce03603b49dd2529e37d47b805730584fc (patch) | |
tree | 01c531c1ba2217c38d183d76e42e8953d654d9a3 /src/test | |
parent | 428fadb7e97e3c95180d75dea73de99c491a9f65 (diff) |
injection_points: Tweak more permutation in isolation test "basic"
The CI has reported that using a marker to force the output of the
detach step to happen after the wait step was not enough, as
isolationtester has managed to report the detach step as waiting before
the wait step finishes in some runs.
src/test/isolation/README tells that there is a more drastic method to
enforce the ordering of the output: an empty step positioned just after
the wait step can force the wait step to complete before the detach step
begins. This method has been able to pass 10 runs in the CI here, while
HEAD seems to fail 15~20% of the time in the CF bot.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/modules/injection_points/expected/basic.out | 3 | ||||
-rw-r--r-- | src/test/modules/injection_points/specs/basic.spec | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/test/modules/injection_points/expected/basic.out b/src/test/modules/injection_points/expected/basic.out index 840ce2dac90..4fc218ed00d 100644 --- a/src/test/modules/injection_points/expected/basic.out +++ b/src/test/modules/injection_points/expected/basic.out @@ -1,6 +1,6 @@ Parsed test spec with 2 sessions -starting permutation: wait1 wakeup2 detach2 +starting permutation: wait1 wakeup2 noop1 detach2 injection_points_attach ----------------------- @@ -19,6 +19,7 @@ injection_points_run (1 row) +step noop1: step detach2: SELECT injection_points_detach('injection-points-wait'); injection_points_detach ----------------------- diff --git a/src/test/modules/injection_points/specs/basic.spec b/src/test/modules/injection_points/specs/basic.spec index 753128e7f36..13d2793f6e4 100644 --- a/src/test/modules/injection_points/specs/basic.spec +++ b/src/test/modules/injection_points/specs/basic.spec @@ -20,6 +20,7 @@ setup { SELECT injection_points_attach('injection-points-wait', 'wait'); } step wait1 { SELECT injection_points_run('injection-points-wait'); } +step noop1 { } session s2 step wakeup2 { SELECT injection_points_wakeup('injection-points-wait'); } @@ -27,9 +28,9 @@ step detach2 { SELECT injection_points_detach('injection-points-wait'); } # Detach after wait and wakeup. Note that the detach may finish before # the SQL function doing the wait returns its result. In order to avoid -# any ordering issues, the detach step reports its result only once the -# wait has completed. This is enforced with a parenthesized marker. -permutation wait1 wakeup2 detach2(wait1) +# any ordering issues, a no-op step is added after the wait, so as the +# detach is not launched until the wait has completed. +permutation wait1 wakeup2 noop1 detach2 # Detach before wakeup. s1 waits until wakeup, ignores the detach. permutation wait1 detach2 wakeup2 |