run-tests: allow some slack about 'waiting on lock' message
It is common to run the tests on very loaded machine when concurrent run might
take a bit longer. Such message are usually harmless, but anoying as they break
the tests.
Test that explicitly depends on this value have been adjusted. This make them
more robust anyway.
A fun case was `test-clone-pull-corruption.t` which, without the previous
changeset introducing extra flushing, ended use having a line 31 (`pulling from
../source`) changing order because the warning message was no longer flushing
stdin before using stderr (stderr being invisible in the test).
Differential Revision: https://phab.mercurial-scm.org/D9507
--- a/tests/run-tests.py Wed Dec 02 23:15:11 2020 +0100
+++ b/tests/run-tests.py Wed Dec 02 20:10:27 2020 +0100
@@ -1448,6 +1448,7 @@
hgrc.write(b'merge = internal:merge\n')
hgrc.write(b'mergemarkers = detailed\n')
hgrc.write(b'promptecho = True\n')
+ hgrc.write(b'timeout.warn=15\n')
hgrc.write(b'[defaults]\n')
hgrc.write(b'[devel]\n')
hgrc.write(b'all-warnings = true\n')
--- a/tests/test-basic.t Wed Dec 02 23:15:11 2020 +0100
+++ b/tests/test-basic.t Wed Dec 02 20:10:27 2020 +0100
@@ -13,6 +13,7 @@
ui.merge=internal:merge
ui.mergemarkers=detailed
ui.promptecho=True
+ ui.timeout.warn=15
web.address=localhost
web\.ipv6=(?:True|False) (re)
web.server-header=testing stub value
--- a/tests/test-commandserver.t Wed Dec 02 23:15:11 2020 +0100
+++ b/tests/test-commandserver.t Wed Dec 02 20:10:27 2020 +0100
@@ -214,6 +214,7 @@
ui.detailed-exit-code=True
ui.merge=internal:merge
ui.mergemarkers=detailed
+ ui.timeout.warn=15
ui.foo=bar
ui.nontty=true
web.address=localhost
@@ -226,6 +227,7 @@
ui.detailed-exit-code=True
ui.merge=internal:merge
ui.mergemarkers=detailed
+ ui.timeout.warn=15
ui.nontty=true
#endif
--- a/tests/test-lock-badness.t Wed Dec 02 23:15:11 2020 +0100
+++ b/tests/test-lock-badness.t Wed Dec 02 20:10:27 2020 +0100
@@ -56,7 +56,7 @@
> EOF
$ echo b > b/b
$ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout &
- $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \
+ $ hg -R b up -q --config ui.timeout.warn=0 --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \
> > preup-stdout 2>preup-stderr
$ wait
$ cat preup-stdout
--- a/tests/test-phases-exchange.t Wed Dec 02 23:15:11 2020 +0100
+++ b/tests/test-phases-exchange.t Wed Dec 02 20:10:27 2020 +0100
@@ -1322,7 +1322,7 @@
error, but EEXIST)
$ touch .hg/store/lock
- $ hg push ../Phi --config ui.timeout=1
+ $ hg push ../Phi --config ui.timeout=1 --config ui.timeout.warn=0
pushing to ../Phi
waiting for lock on repository $TESTTMP/Upsilon held by ''
abort: repository $TESTTMP/Upsilon: timed out waiting for lock held by ''