Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9e02005

Browse files
committed
injection_points: Re-enable permutation in isolation test "basic"
This test has been disabled in9f00edc due to an instable expectedoutput, where it would be possible for the wait step to report itsresult after the detach step is done. The expected output was orderedso as the detach would always report last.Isolation test permutations have the option to use markers to controlthe ordering for cases like this one, as documented insrc/test/isolation/README. The permutation is enabled once again, thistime with a marker added so as the detach step reports only once thewait step has finished, ensuring a correct output ordering.Reviewed-by: Bertrand DrouvotDiscussion:https://postgr.es/m/Z6MBZTX5EqQ6A8Zc@paquier.xyz
1 parent306dc52 commit9e02005

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
stepwakeup2{SELECTinjection_points_wakeup('injection-points-wait');}
2626
stepdetach2{SELECTinjection_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+
permutationwait1wakeup2detach2(wait1)
3433

3534
# Detach before wakeup. s1 waits until wakeup, ignores the detach.
3635
permutationwait1detach2wakeup2

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp