remotefilelog-test: glob some flaky output line (
issue6083)
The two following lines are flaky 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.
Differential Revision: https://phab.mercurial-scm.org/D8102
--- a/tests/test-remotefilelog-bgprefetch.t Mon Feb 03 11:56:02 2020 -0500
+++ b/tests/test-remotefilelog-bgprefetch.t Sun Feb 09 01:34:37 2020 +0100
@@ -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
+.. flaky, the core the test is checked when checking the cache dir, so
+.. hopefully this flakyness 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
+.. flaky, the core the test is checked when checking the cache dir, so
+.. hopefully this flakyness 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