##// END OF EJS Templates
test-transaction-safety: document the test schedule...
marmoute -
r48585:4870a8dc stable
parent child Browse files
Show More
@@ -41,7 +41,23 b' content until it is committed.'
41 setup
41 setup
42 -----
42 -----
43
43
44 synchronisation+output script:
44 synchronisation+output script using the following schedule:
45
46 [A1] "external" is started
47 [A2] "external" waits on EXT_UNLOCK
48 [A2] "external" + creates EXT_WAITING β†’ unlocks [C1]
49 [B1] "hg commit/pull" is started
50 [B2] "hg commit/pull" is ready to be committed
51 [B3] "hg commit/pull" spawn "internal" using a pretxnclose hook (need [C4])
52 [C1] "internal" waits on EXT_WAITING (need [A2])
53 [C2] "internal" show the tipmost revision (inside of the transaction)
54 [C3] "internal" waits on EXT_DONE (need [A4])
55 [C3] "internal" + creates EXT_UNLOCK β†’ unlocks [A2]
56 [A3] "external" show the tipmost revision (outside of the transaction)
57 [A4] "external" creates EXT_DONE β†’ unlocks [C3]
58 [C4] "internal" end of execution -> unlock [B3]
59 [B4] "hg commit/pull" transaction is committed on disk
60
45
61
46 $ mkdir sync
62 $ mkdir sync
47 $ mkdir output
63 $ mkdir output
@@ -60,6 +76,7 b' synchronisation+output script:'
60 > EOF
76 > EOF
61 $ cat << EOF > script/internal.sh
77 $ cat << EOF > script/internal.sh
62 > #!/bin/sh
78 > #!/bin/sh
79 > "$RUNTESTDIR/testlib/wait-on-file" 5 "$HG_TEST_FILE_EXT_WAITING"
63 > hg log --rev 'tip' -T 'internal: {rev} {desc}\n' > "$TESTTMP/output/internal.out"
80 > hg log --rev 'tip' -T 'internal: {rev} {desc}\n' > "$TESTTMP/output/internal.out"
64 > "$RUNTESTDIR/testlib/wait-on-file" 5 "$HG_TEST_FILE_EXT_DONE" "$HG_TEST_FILE_EXT_UNLOCK"
81 > "$RUNTESTDIR/testlib/wait-on-file" 5 "$HG_TEST_FILE_EXT_DONE" "$HG_TEST_FILE_EXT_UNLOCK"
65 > EOF
82 > EOF
General Comments 0
You need to be logged in to leave comments. Login now