From db4ddfc1bdb7afbcd20a16adb5d456dbe103ce8d Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 21 Apr 2008 17:50:50 -0700 Subject: [PATCH] mutable: improve testing to exercise the non-cached case --- src/allmydata/test/test_mutable.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/allmydata/test/test_mutable.py b/src/allmydata/test/test_mutable.py index 66cdf16c..bc587af5 100644 --- a/src/allmydata/test/test_mutable.py +++ b/src/allmydata/test/test_mutable.py @@ -301,6 +301,14 @@ class Filenode(unittest.TestCase, testutil.ShouldFailMixin): n.download_version(smap, smap.best_recoverable_version())) d.addCallback(lambda res: self.failUnlessEqual(res, "contents 3")) + # test a file that is large enough to overcome the + # mapupdate-to-retrieve data caching (i.e. make the shares larger + # than the default readsize, which is 2000 bytes). A 15kB file + # will have 5kB shares. + d.addCallback(lambda res: n.overwrite("large size file" * 1000)) + d.addCallback(lambda res: n.download_best_version()) + d.addCallback(lambda res: + self.failUnlessEqual(res, "large size file" * 1000)) return d d.addCallback(_created) return d -- 2.45.2