Merge pull request #1638 from coreos-inc/swift-retry-seek
Add retry support to Swift
This commit is contained in:
commit
b0bffe56ca
3 changed files with 18 additions and 5 deletions
|
@ -88,6 +88,14 @@ class TestLimitingStream(unittest.TestCase):
|
|||
self.assertEquals('', stream.read(1))
|
||||
self.assertEquals(stream.tell(), 3)
|
||||
|
||||
def test_seek_to_tell(self):
|
||||
fileobj = StringIO('this is a cool test')
|
||||
stream = LimitingStream(fileobj, 3)
|
||||
stream.seek(stream.tell())
|
||||
|
||||
self.assertEquals('thi', stream.read(4))
|
||||
self.assertEquals(stream.tell(), 3)
|
||||
|
||||
|
||||
class TestStreamSlice(unittest.TestCase):
|
||||
def test_none_read(self):
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import unittest
|
||||
import os
|
||||
|
||||
from StringIO import StringIO
|
||||
|
||||
from util.registry.queueprocess import QueueResult
|
||||
from util.registry.queuefile import QueueFile
|
||||
|
||||
|
|
Reference in a new issue