)]}'
{"test/unit/proxy/test_server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2f00d1b5e42b488fa11311db86a41e5c18c026c1","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"        self.app.account_ring.set_replicas(3)"},{"line_number":1316,"context_line":"        self.app.container_ring.set_replicas(3)"},{"line_number":1317,"context_line":"        for policy in POLICIES:"},{"line_number":1318,"context_line":"            policy.object_ring \u003d FakeRing(base_port\u003d3000)"},{"line_number":1319,"context_line":""},{"line_number":1320,"context_line":"    @unpatch_policies"},{"line_number":1321,"context_line":"    def test_policy_IO(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_4b6863b9","line":1318,"updated":"2017-05-02 19:13:57.000000000","message":"I don\u0027t understand why this is necessary. Tests seem to pass fine if I remove the set_replicas() calls, and the failures that come up when I remove the object ring replacements both seem to do with error limiting... IDK, this seems like overkill for clearing the error limiting stats?","commit_id":"381640cf90f919832f8c266e39c526b62c287f28"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2f00d1b5e42b488fa11311db86a41e5c18c026c1","unresolved":false,"context_lines":[{"line_number":5618,"context_line":""},{"line_number":5619,"context_line":"class TestECObjectController(BaseTestECObjectController, unittest.TestCase):"},{"line_number":5620,"context_line":"    def setUp(self):"},{"line_number":5621,"context_line":"        self.ec_policy \u003d POLICIES[3]"},{"line_number":5622,"context_line":"        super(TestECObjectController, self).setUp()"},{"line_number":5623,"context_line":""},{"line_number":5624,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_2bdbd87d","line":5621,"updated":"2017-05-02 19:13:57.000000000","message":"Where did this policy come from? I know I don\u0027t have one in my swift.conf, and this patch seems to be all about *stopping* use patching policies for EC... yet tests pass. What?\n\nI guess it must be coming from a call to setup_servers, which I guess is coming from setup()? When is that getting called? I thought unittests looked for something called setUpModule() [1]? Our func tests use that, anyway...\n\nEven if that\u0027s right, I thought the module-level setup would be called before the individual setUp()s, so how was this working before, when we patched things to only have one policy, then tell tests use use policy 3 or 4?\n\nI dislike magic, and this all feels like there\u0027s a lot of it :-/\n\n[1] https://docs.python.org/2/library/unittest.html#setupmodule-and-teardownmodule","commit_id":"381640cf90f919832f8c266e39c526b62c287f28"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9f5f3fc34bea29f5a277f961b2c177a71043c75c","unresolved":false,"context_lines":[{"line_number":5618,"context_line":""},{"line_number":5619,"context_line":"class TestECObjectController(BaseTestECObjectController, unittest.TestCase):"},{"line_number":5620,"context_line":"    def setUp(self):"},{"line_number":5621,"context_line":"        self.ec_policy \u003d POLICIES[3]"},{"line_number":5622,"context_line":"        super(TestECObjectController, self).setUp()"},{"line_number":5623,"context_line":""},{"line_number":5624,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_593dd02a","line":5621,"in_reply_to":"5ff73747_2bdbd87d","updated":"2017-05-03 08:17:33.000000000","message":"nosetests will look for a setup() function [1] as well as setUpModule(), setUp(), setup_module()...whereas unittest looks for setUpModule, so if you run the tests with unittest you\u0027ll see failures (lots!)\n\nRe. POLICIES[3] I *think* this worked before because the EC specific tests (every test in BaseTestECObjectController) unpatches policies so you get back to the setup_servers policies!! Which is what this patch is correcting.\n\nPhew, it was a mess. But IIRC Kota\u0027s strategy was first to do the reorganisation of the class model without fixing the policy patching (to make that patch easier to grok) and then in this patch sort out the policy patching.\n\n\n[1] http://nose.readthedocs.io/en/latest/writing_tests.html#test-modules","commit_id":"381640cf90f919832f8c266e39c526b62c287f28"}]}
