From: Zooko O'Whielacronx Date: Sun, 18 Jul 2010 22:29:07 +0000 (-0700) Subject: immutable: test for #1124 X-Git-Tag: allmydata-tahoe-1.7.1~10 X-Git-Url: https://git.rkrishnan.org/pf/content/en/footer/frontends?a=commitdiff_plain;h=0f46766a51792eb510734c6db76308384b73c17d;p=tahoe-lafs%2Ftahoe-lafs.git immutable: test for #1124 --- diff --git a/src/allmydata/test/test_upload.py b/src/allmydata/test/test_upload.py index 4561638d..782f52f4 100644 --- a/src/allmydata/test/test_upload.py +++ b/src/allmydata/test/test_upload.py @@ -1083,6 +1083,31 @@ class EncodingParameters(GridTestMixin, unittest.TestCase, SetDEPMixin, self.failUnlessEqual(results.pushed_shares, 3)) return d + def test_problem_layout_ticket1124(self): + self.basedir = self.mktemp() + d = self._setup_and_upload(k=2, n=4) + + # server 0: shares 0, 1, 2, 3 + # server 1: shares 0, 3 + # server 2: share 1 + # server 3: share 2 + # With this layout, an upload should just be satisfied that the current distribution is good enough, right? + def _setup(ign): + self._add_server_with_share(server_number=0, share_number=None) + self._add_server_with_share(server_number=1, share_number=0) + self._add_server_with_share(server_number=2, share_number=1) + self._add_server_with_share(server_number=3, share_number=2) + # Copy shares + self._copy_share_to_server(3, 1) + client = self.g.clients[0] + client.DEFAULT_ENCODING_PARAMETERS['happy'] = 4 + return client + + d.addCallback(_setup) + d.addCallback(lambda client: + client.upload(upload.Data("data" * 10000, convergence=""))) + return d + test_problem_layout_ticket1124.todo = "Fix this after 1.7.1 release." def test_happiness_with_some_readonly_peers(self): # Try the following layout