]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_upload.py: server-vs-tracker cleanup
authorBrian Warner <warner@lothar.com>
Sun, 27 Feb 2011 02:11:15 +0000 (19:11 -0700)
committerBrian Warner <warner@lothar.com>
Sun, 27 Feb 2011 02:11:15 +0000 (19:11 -0700)
src/allmydata/test/test_upload.py

index 03cb6a1e628e29865ac8108ac4a600470a615a75..ac826451face79419a7313f029ffacaf49f0e5cf 100644 (file)
@@ -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