Patchwork D7586: remotefilelog: have command wait for background task in the tests

login
register
mail settings
Submitter phabricator
Date Dec. 9, 2019, 1:03 p.m.
Message ID <differential-rev-PHID-DREV-lrj4fjypacdwdiqh5wqa-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43651/
State Superseded
Headers show

Comments

phabricator - Dec. 9, 2019, 1:03 p.m.
marmoute created this revision.
marmoute added a comment.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.


  target is the stable-branch

REVISION SUMMARY
  We leverage the feature introduced in the two previous commit to have the main
  command wait for the background task to be finished before returning.
  
  All test still pass and instability seems to have gone away.
  
  Most of the sleep and explicit wait are now useless and will be cleaned up in
  later changesets.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-remotefilelog-bgprefetch.t
  tests/test-remotefilelog-repack-fast.t
  tests/test-remotefilelog-repack.t

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-devel
phabricator - Dec. 11, 2019, 10:26 a.m.
marmoute added a comment.


  For those who wants to see the test misbehaving, your just need to run it in a loop on heavy load:
  `python run-tests.py --runs-per-test 10000 --loop -j 90 test-remotefilelog-bgprefetch.t`

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7586/new/

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

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

Patch

diff --git a/tests/test-remotefilelog-repack.t b/tests/test-remotefilelog-repack.t
--- a/tests/test-remotefilelog-repack.t
+++ b/tests/test-remotefilelog-repack.t
@@ -6,6 +6,7 @@ 
   $ cat >> $HGRCPATH <<EOF
   > [devel]
   > remotefilelog.ensurestart=True
+  > remotefilelog.bg-wait=True
   > EOF
 
   $ hg init master
diff --git a/tests/test-remotefilelog-repack-fast.t b/tests/test-remotefilelog-repack-fast.t
--- a/tests/test-remotefilelog-repack-fast.t
+++ b/tests/test-remotefilelog-repack-fast.t
@@ -8,6 +8,7 @@ 
   > fastdatapack=True
   > [devel]
   > remotefilelog.ensurestart=True
+  > remotefilelog.bg-wait=True
   > EOF
 
   $ hg init master
diff --git a/tests/test-remotefilelog-bgprefetch.t b/tests/test-remotefilelog-bgprefetch.t
--- a/tests/test-remotefilelog-bgprefetch.t
+++ b/tests/test-remotefilelog-bgprefetch.t
@@ -6,6 +6,7 @@ 
   $ cat >> $HGRCPATH <<EOF
   > [devel]
   > remotefilelog.ensurestart=True
+  > remotefilelog.bg-wait=True
   > EOF
 
   $ hg init master