From: Brian Warner Date: Sun, 27 Feb 2011 02:11:15 +0000 (-0700) Subject: test_upload.py: server-vs-tracker cleanup X-Git-Url: https://git.rkrishnan.org/pf/vdrive?a=commitdiff_plain;h=9fc55bad255ff15a3d8fdbc855cf51fb7a392d0c;p=tahoe-lafs%2Ftahoe-lafs.git test_upload.py: server-vs-tracker cleanup --- diff --git a/src/allmydata/test/test_upload.py b/src/allmydata/test/test_upload.py index 03cb6a1e..ac826451 100644 --- a/src/allmydata/test/test_upload.py +++ b/src/allmydata/test/test_upload.py @@ -773,18 +773,18 @@ class EncodingParameters(GridTestMixin, unittest.TestCase, SetDEPMixin, d = selector.get_shareholders(broker, sh, storage_index, share_size, block_size, num_segments, 10, 3, 4) - def _have_shareholders((upload_servers, already_servers)): - assert servers_to_break <= len(upload_servers) + def _have_shareholders((upload_trackers, already_servers)): + assert servers_to_break <= len(upload_trackers) for index in xrange(servers_to_break): - server = list(upload_servers)[index] - for share in server.buckets.keys(): - server.buckets[share].abort() + tracker = list(upload_trackers)[index] + for share in tracker.buckets.keys(): + tracker.buckets[share].abort() buckets = {} servermap = already_servers.copy() - for server in upload_servers: - buckets.update(server.buckets) - for bucket in server.buckets: - servermap.setdefault(bucket, set()).add(server.serverid) + for tracker in upload_trackers: + buckets.update(tracker.buckets) + for bucket in tracker.buckets: + servermap.setdefault(bucket, set()).add(tracker.serverid) encoder.set_shareholders(buckets, servermap) d = encoder.start() return d