mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
storage.py: add a test for the next_power_of_k fix I made a few hours ago, basically do an upload with a non-power-of-two number of segments
This commit is contained in:
parent
6e1ad64c9d
commit
225fbfee57
@ -140,6 +140,14 @@ class GoodServer(unittest.TestCase):
|
||||
d.addCallback(self._check_large, SIZE_LARGE)
|
||||
return d
|
||||
|
||||
def test_data_large_odd_segments(self):
|
||||
data = self.get_data(SIZE_LARGE)
|
||||
segsize = int(SIZE_LARGE / 2.5)
|
||||
# we want 3 segments, since that's not a power of two
|
||||
d = self.u.upload_data(data, {"max_segment_size": segsize})
|
||||
d.addCallback(self._check_large, SIZE_LARGE)
|
||||
return d
|
||||
|
||||
def test_filehandle_zero(self):
|
||||
data = self.get_data(SIZE_ZERO)
|
||||
d = self.u.upload_filehandle(StringIO(data))
|
||||
|
Loading…
Reference in New Issue
Block a user