testing: remove expectation of error on bad node insert
authorGregory Szorc <gregory.szorc@gmail.com>
Tue, 16 Oct 2018 15:24:06 +0200
changeset 40322 ddeb510d6815
parent 40321 6994a8be3663
child 40323 2c0aa02ecd5a
testing: remove expectation of error on bad node insert addgroup() doesn't necessarily validate the hashes of each incoming revision. This is an optimization that allows delta group application to complete faster. The fact that revlog raises in this particular test is an implementation detail due to the way revlogs are testing multiple deltas. Differential Revision: https://phab.mercurial-scm.org/D5115
mercurial/testing/storage.py
--- a/mercurial/testing/storage.py	Tue Oct 16 17:45:39 2018 +0200
+++ b/mercurial/testing/storage.py	Tue Oct 16 15:24:06 2018 +0200
@@ -1073,14 +1073,7 @@
         fulltext0 = b'foo'
         delta0 = mdiff.trivialdiffheader(len(fulltext0)) + fulltext0
 
-        deltas = [
-            (b'\x01' * 20, nullid, nullid, nullid, nullid, delta0, 0),
-        ]
-
         with self._maketransactionfn() as tr:
-            with self.assertRaises(error.StorageError):
-                f.addgroup(deltas, linkmapper, tr, addrevisioncb=cb)
-
             node0 = f.add(fulltext0, None, tr, 0, nullid, nullid)
 
         f = self._makefilefn()