]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_system.py: do a large-file test (1.5MB) to trigger pauseProducing
authorBrian Warner <warner@lothar.com>
Wed, 19 Sep 2007 08:43:44 +0000 (01:43 -0700)
committerBrian Warner <warner@lothar.com>
Wed, 19 Sep 2007 08:43:44 +0000 (01:43 -0700)
src/allmydata/test/test_system.py

index 4577dc89d5d375bc60d31c34f7b4f4c8a3c5a2f5..b3e57ca183971ae3df0816a0a3afc1f0d5112128 100644 (file)
@@ -576,6 +576,12 @@ class SystemTest(testutil.SignalMixin, unittest.TestCase):
                                            "new.txt contents"))
         d.addCallback(lambda res: self.GET("vdrive/global/subdir3/new.txt"))
         d.addCallback(self.failUnlessEqual, "new.txt contents")
+        # and again with something large enough to use multiple segments,
+        # and hopefully trigger pauseProducing too
+        d.addCallback(lambda res: self.PUT("vdrive/global/subdir3/big.txt",
+                                           "big" * 500000)) # 1.5MB
+        d.addCallback(lambda res: self.GET("vdrive/global/subdir3/big.txt"))
+        d.addCallback(lambda res: self.failUnlessEqual(len(res), 1500000))
 
         # can we replace files in place?
         d.addCallback(lambda res: self.PUT("vdrive/global/subdir3/new.txt",