D9507: run-tests: allow some slack about 'waiting on lock' message

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Dec 2 22:20:26 UTC 2020


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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).

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9507

AFFECTED FILES
  tests/run-tests.py
  tests/test-basic.t
  tests/test-commandserver.t
  tests/test-lock-badness.t
  tests/test-phases-exchange.t

CHANGE DETAILS

diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t
--- a/tests/test-phases-exchange.t
+++ b/tests/test-phases-exchange.t
@@ -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 ''
diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t
--- a/tests/test-lock-badness.t
+++ b/tests/test-lock-badness.t
@@ -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
diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t
--- a/tests/test-commandserver.t
+++ b/tests/test-commandserver.t
@@ -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
 
diff --git a/tests/test-basic.t b/tests/test-basic.t
--- a/tests/test-basic.t
+++ b/tests/test-basic.t
@@ -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
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -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')



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list