test_system.py: do a large-file test (1.5MB) to trigger pauseProducing

This commit is contained in:
Brian Warner 2007-09-19 01:43:44 -07:00
parent 64d17c4532
commit d31d7ff941

View 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",