Fix a problem with typechecking.

Using remote_write() isn't quite right given move to HTTP, but can fight that
battle another day.
This commit is contained in:
Itamar Turner-Trauring 2021-11-18 15:58:55 -05:00
parent e2636466b5
commit 4c11177387
2 changed files with 1 additions and 4 deletions

View File

@ -252,9 +252,6 @@ class BucketWriter(Referenceable): # type: ignore # warner/foolscap#78
return self._max_size
def remote_write(self, offset, data):
self.write(offset, data)
def write(self, offset, data):
# Delay the timeout, since we received data:
self._timeout.reset(30 * 60)
start = self._clock.seconds()

View File

@ -319,7 +319,7 @@ class Bucket(unittest.TestCase):
# 20 minutes pass, getting close to the timeout...
clock.advance(29 * 60)
# .. but we receive a write! So that should delay the timeout.
bw.write(0, b"hello")
bw.remote_write(0, b"hello")
self._assert_timeout_only_after_30_minutes(clock, bw)
def test_bucket_closing_cancels_timeout(self):