Patchwork D8102: remotefilelog-test: glob some flacky output line (issue6083)

login
register
mail settings
Submitter phabricator
Date Feb. 10, 2020, 10:38 a.m.
Message ID <differential-rev-PHID-DREV-gyuq6vpdf5dgfh2d45xv-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45058/
State Superseded
Headers show

Comments

phabricator - Feb. 10, 2020, 10:38 a.m.
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The two following lines are flacky underload, yet the final result is correct.
  The command involves background pre-check of output, these are not stable
  probably because they run in parallel in multiple process.
  
  I spent a couple of hours trying to understand the pattern and gave up. The
  documented intend of these tests is safely guaranteed by checking the cache
  content after the command.
  
  If it become useful to start testing precise internal details of the, they will
  have to be tested in a more appropriate framework than `.t` tests.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-remotefilelog-bgprefetch.t

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 10, 2020, 5:45 p.m.
pulkit added a comment.


  Is this and next one targeted for stable branch? I see a mention about that in next patch.

REPOSITORY
  rHG Mercurial

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

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

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

Patch

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
@@ -178,8 +178,11 @@ 
   $ clearcache
   $ find $CACHEDIR -type f | sort
   $ echo b > b
+.. The following output line about files fetches is globed because it is
+.. flacky, the core the test is checked when checking the cache dir, so
+.. hopefully this flackyness is not hiding any actual bug.
   $ hg commit -qAm b
-  * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob)
+  * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?)
   $ hg bookmark temporary
   $ find $CACHEDIR -type f | sort
   $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
@@ -222,10 +225,19 @@ 
   (leaving bookmark temporary)
   $ clearcache
   $ find $CACHEDIR -type f | sort
+.. The following output line about files fetches is globed because it is
+.. flacky, the core the test is checked when checking the cache dir, so
+.. hopefully this flackyness is not hiding any actual bug.
   $ hg rebase -s temporary -d foo
   rebasing 3:d9cf06e3b5b6 "b" (temporary tip)
   saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/d9cf06e3b5b6-e5c3dc63-rebase.hg
-  3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
+  ? files fetched over ? fetches - (? misses, 0.00% hit ratio) over *s (glob)
+  $ find $CACHEDIR -type f | sort
+  $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
+  $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack
+  $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx
+  $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack
+  $TESTTMP/hgcache/repos
 
 # Ensure that file 'y' was prefetched - it was not part of the rebase operation and therefore
 # could only be downloaded by the background prefetch