Skip to content

Commit 9e02005

Browse files
committed
injection_points: Re-enable permutation in isolation test "basic"
This test has been disabled in 9f00edc due to an instable expected output, where it would be possible for the wait step to report its result after the detach step is done. The expected output was ordered so as the detach would always report last. Isolation test permutations have the option to use markers to control the ordering for cases like this one, as documented in src/test/isolation/README. The permutation is enabled once again, this time with a marker added so as the detach step reports only once the wait step has finished, ensuring a correct output ordering. Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/Z6MBZTX5EqQ6A8Zc@paquier.xyz
1 parent 306dc52 commit 9e02005

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

src/test/modules/injection_points/expected/basic.out

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
Parsed test spec with 2 sessions
22

3+
starting permutation: wait1 wakeup2 detach2
4+
injection_points_attach
5+
-----------------------
6+
7+
(1 row)
8+
9+
step wait1: SELECT injection_points_run('injection-points-wait'); <waiting ...>
10+
step wakeup2: SELECT injection_points_wakeup('injection-points-wait');
11+
injection_points_wakeup
12+
-----------------------
13+
14+
(1 row)
15+
16+
step wait1: <... completed>
17+
injection_points_run
18+
--------------------
19+
20+
(1 row)
21+
22+
step detach2: SELECT injection_points_detach('injection-points-wait');
23+
injection_points_detach
24+
-----------------------
25+
26+
(1 row)
27+
28+
329
starting permutation: wait1 detach2 wakeup2
430
injection_points_attach
531
-----------------------

src/test/modules/injection_points/specs/basic.spec

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ session s2
2525
step wakeup2 { SELECT injection_points_wakeup('injection-points-wait'); }
2626
step detach2 { SELECT injection_points_detach('injection-points-wait'); }
2727

28-
# Detach after wait and wakeup.
29-
# Permutations like the following one commented out should be avoided, as
30-
# the detach may finish before the SQL function doing the wait returns
31-
# its result. It is recommended to use wakeups as the last permutation
32-
# should a wait be done within an SQL function.
33-
#permutation wait1 wakeup2 detach2
28+
# Detach after wait and wakeup. Note that the detach may finish before
29+
# the SQL function doing the wait returns its result. In order to avoid
30+
# any ordering issues, the detach step reports its result only once the
31+
# wait has completed. This is enforced with a parenthesized marker.
32+
permutation wait1 wakeup2 detach2(wait1)
3433

3534
# Detach before wakeup. s1 waits until wakeup, ignores the detach.
3635
permutation wait1 detach2 wakeup2

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy