From 47f2c143d0ab57f84d2800a24c8176e92e9479b7 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Mon, 15 Mar 2021 11:07:03 -0400 Subject: [PATCH] Tests pass on Python 3. --- src/allmydata/test/test_hung_server.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/allmydata/test/test_hung_server.py b/src/allmydata/test/test_hung_server.py index d3a42d416..8c32a1663 100644 --- a/src/allmydata/test/test_hung_server.py +++ b/src/allmydata/test/test_hung_server.py @@ -14,8 +14,8 @@ from allmydata.test.common import ShouldFailMixin from allmydata.util.pollmixin import PollMixin from allmydata.interfaces import NotEnoughSharesError -immutable_plaintext = "data" * 10000 -mutable_plaintext = "muta" * 10000 +immutable_plaintext = b"data" * 10000 +mutable_plaintext = b"muta" * 10000 class HungServerDownloadTest(GridTestMixin, ShouldFailMixin, PollMixin, unittest.TestCase): @@ -105,7 +105,7 @@ class HungServerDownloadTest(GridTestMixin, ShouldFailMixin, PollMixin, self.shares = self.find_uri_shares(self.uri) d.addCallback(_uploaded_mutable) else: - data = upload.Data(immutable_plaintext, convergence="") + data = upload.Data(immutable_plaintext, convergence=b"") d = self.c0.upload(data) def _uploaded_immutable(upload_res): self.uri = upload_res.get_uri() @@ -262,7 +262,7 @@ class HungServerDownloadTest(GridTestMixin, ShouldFailMixin, PollMixin, # is shut off. That will leave 4 OVERDUE and 1 # stuck-but-not-overdue, for a total of 5 requests in in # _sf.pending_requests - for t in self._sf.overdue_timers.values()[:4]: + for t in list(self._sf.overdue_timers.values())[:4]: t.reset(-1.0) # the timers ought to fire before the eventual-send does return fireEventually()