diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-01-03 11:16:34 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-01-03 18:22:41 -0300 |
commit | 6c8be5962aea2eee8c366c01bbbcf5bf5ddf5294 (patch) | |
tree | bc385ddb0512dfe3a6201f8634200540e4496d5b | |
parent | 3e68686e2c55799234ecd020bd1621f913d65475 (diff) | |
download | postgresql-6c8be5962aea2eee8c366c01bbbcf5bf5ddf5294.tar.gz postgresql-6c8be5962aea2eee8c366c01bbbcf5bf5ddf5294.zip |
Revert "Fix isolation test to be less timing-dependent"
This reverts commit 2268e6afd596. It turned out that inconsistency in
the report is still possible, so go back to the simpler formulation of
the test and instead add an alternate expected output.
Discussion: https://postgr.es/m/20180103193728.ysqpcp2xjnqpiep7@alvherre.pgsql
-rw-r--r-- | src/test/isolation/expected/multiple-cic.out | 15 | ||||
-rw-r--r-- | src/test/isolation/expected/multiple-cic_1.out | 20 | ||||
-rw-r--r-- | src/test/isolation/specs/multiple-cic.spec | 12 |
3 files changed, 29 insertions, 18 deletions
diff --git a/src/test/isolation/expected/multiple-cic.out b/src/test/isolation/expected/multiple-cic.out index 0b470e7d1de..2bf8fe365e1 100644 --- a/src/test/isolation/expected/multiple-cic.out +++ b/src/test/isolation/expected/multiple-cic.out @@ -1,9 +1,6 @@ -Parsed test spec with 3 sessions +Parsed test spec with 2 sessions -starting permutation: s2l s1i s2i s3u -pg_advisory_lock - - +starting permutation: s2l s1i s2i step s2l: SELECT pg_advisory_lock(281457); pg_advisory_lock @@ -14,11 +11,9 @@ step s1i: <waiting ...> step s2i: CREATE INDEX CONCURRENTLY mcic_two_pkey ON mcic_two (id) - WHERE unlck() AND lck_shr(572814); - <waiting ...> -step s3u: SELECT unlck(); + WHERE unlck(); + +step s1i: <... completed> unlck t -step s1i: <... completed> -step s2i: <... completed> diff --git a/src/test/isolation/expected/multiple-cic_1.out b/src/test/isolation/expected/multiple-cic_1.out new file mode 100644 index 00000000000..e41e04a4804 --- /dev/null +++ b/src/test/isolation/expected/multiple-cic_1.out @@ -0,0 +1,20 @@ +Parsed test spec with 2 sessions + +starting permutation: s2l s1i s2i +step s2l: SELECT pg_advisory_lock(281457); +pg_advisory_lock + + +step s1i: + CREATE INDEX CONCURRENTLY mcic_one_pkey ON mcic_one (id) + WHERE lck_shr(281457); + <waiting ...> +step s2i: + CREATE INDEX CONCURRENTLY mcic_two_pkey ON mcic_two (id) + WHERE unlck(); + <waiting ...> +step s1i: <... completed> +step s2i: <... completed> +unlck + +t diff --git a/src/test/isolation/specs/multiple-cic.spec b/src/test/isolation/specs/multiple-cic.spec index fbec67ee252..3199667be2c 100644 --- a/src/test/isolation/specs/multiple-cic.spec +++ b/src/test/isolation/specs/multiple-cic.spec @@ -26,19 +26,15 @@ session "s1" step "s1i" { CREATE INDEX CONCURRENTLY mcic_one_pkey ON mcic_one (id) WHERE lck_shr(281457); -} -step "s1u" { SELECT unlck(); } + } +teardown { SELECT unlck(); } session "s2" step "s2l" { SELECT pg_advisory_lock(281457); } step "s2i" { CREATE INDEX CONCURRENTLY mcic_two_pkey ON mcic_two (id) - WHERE unlck() AND lck_shr(572814); + WHERE unlck(); } -session "s3" -setup { SELECT pg_advisory_lock(572814); } -step "s3u" { SELECT unlck(); } - -permutation "s2l" "s1i" "s2i" "s3u" +permutation "s2l" "s1i" "s2i" |