##// END OF EJS Templates
tests: fix the flaky test test-logtoprocess.t...
Arseniy Alekseyev -
r50387:b3e77d53 stable
parent child Browse files
Show More
@@ -83,10 +83,9 b' Confirm that logging blocked time catche'
83 83
84 84 Try to confirm that pager wait on logtoprocess:
85 85
86 Add a script that wait on a file to appears for 5 seconds, if it sees it touch
87 another file or die after 5 seconds. If the scripts is awaited by hg, the
88 script will die after the timeout before we could touch the file and the
89 resulting file will not exists. If not, we will touch the file and see it.
86 Add a script that waits on a file to appear. If the script is awaited by hg,
87 the script will die after the timeout before we could touch the file and the
88 resulting file will not exist. If not, we will touch the file and see it.
90 89
91 90 $ cat >> fakepager.py <<EOF
92 91 > import sys
@@ -100,15 +99,9 b' resulting file will not exists. If not, '
100 99
101 100 $ cat > $TESTTMP/wait-output.sh << EOF
102 101 > #!/bin/sh
103 > for i in \`$TESTDIR/seq.py 50\`; do
104 > if [ -f "$TESTTMP/wait-for-touched" ];
105 > then
106 > touch "$TESTTMP/touched";
107 > break;
108 > else
109 > sleep 0.1;
110 > fi
111 > done
102 > set -eu
103 > "$RUNTESTDIR/testlib/wait-on-file" 10 "$TESTTMP/wait-for-touched"
104 > touch "$TESTTMP/touched"
112 105 > EOF
113 106 $ chmod +x $TESTTMP/wait-output.sh
114 107
@@ -124,6 +117,6 b' resulting file will not exists. If not, '
124 117 $ hg version -q --pager=always
125 118 Mercurial Distributed SCM (version *) (glob)
126 119 $ touch $TESTTMP/wait-for-touched
127 $ sleep 0.2
120 $ "$RUNTESTDIR/testlib/wait-on-file" 5 "$TESTTMP/touched"
128 121 $ test -f $TESTTMP/touched && echo "SUCCESS Pager is not waiting on ltp" || echo "FAIL Pager is waiting on ltp"
129 122 SUCCESS Pager is not waiting on ltp
General Comments 0
You need to be logged in to leave comments. Login now