obshashrange: add a test for `hg debugupdatecache`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 14 Aug 2018 15:24:22 +0200
changeset 3943 beb6a77223d2
parent 3942 38c9a050ba03
child 3944 4ef3800c9bf8
obshashrange: add a test for `hg debugupdatecache` It seem to be properly filling the caches.
tests/test-discovery-obshashrange.t
--- a/tests/test-discovery-obshashrange.t	Tue Aug 14 18:21:23 2018 +0200
+++ b/tests/test-discovery-obshashrange.t	Tue Aug 14 15:24:22 2018 +0200
@@ -876,3 +876,31 @@
              5 c8d03c1b5e94            5            1            6 446c2dc3bce5
              6 f69452c5b1af            6            1            7 000000000000
 
+Cache warming capabilities
+--------------------------
+
+  $ hg config experimental.obshashrange
+  1
+  $ hg config experimental.obshashrange.warm-cache
+  [1]
+  $ hg debugupdatecache
+  $ ls -1 .hg/cache/evoext*
+  .hg/cache/evoext-depthcache-00
+  .hg/cache/evoext-firstmerge-00
+  .hg/cache/evoext-obscache-00
+  .hg/cache/evoext-stablesortcache-00
+  .hg/cache/evoext_obshashrange_v2.sqlite
+  .hg/cache/evoext_stablerange_v2.sqlite
+  $ rm -f .hg/cache/evoext*
+  $ ls -1 .hg/cache/ | grep evoext
+  [1]
+  $ hg debugupdatecache --debug
+  updating the branch cache
+  invalid branchheads cache (served): tip differs
+  $ f -s .hg/cache/evoext*
+  .hg/cache/evoext-depthcache-00: size=96
+  .hg/cache/evoext-firstmerge-00: size=96
+  .hg/cache/evoext-obscache-00: size=73
+  .hg/cache/evoext-stablesortcache-00: size=100
+  .hg/cache/evoext_obshashrange_v2.sqlite: size=20480
+  .hg/cache/evoext_stablerange_v2.sqlite: size=36864