)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"0c615bb07bec3913dd5b35fe825d99c626132aa0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"concurrently before benchmark task like download or list objects and"},{"line_number":12,"context_line":"delete it after task finishes."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"* plugins/openstack/context/swift/objects.py - swift object generator"},{"line_number":15,"context_line":"                                               class"},{"line_number":16,"context_line":"* plugins/openstack/context/swift/utils.py - mix-in class that can be"},{"line_number":17,"context_line":"                                             used in other context"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5afe65bd_a98d197d","line":14,"updated":"2015-06-02 10:34:35.000000000","message":"Generally speaking these are to be extracted from git log --summary","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"9d71ea89f7c77269b04f392d1e2998e20a771baf","unresolved":false,"context_lines":[{"line_number":11,"context_line":"concurrently before benchmark task like download or list objects and"},{"line_number":12,"context_line":"delete it after task finishes."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"* plugins/openstack/context/swift/objects.py - swift object generator"},{"line_number":15,"context_line":"                                               class"},{"line_number":16,"context_line":"* plugins/openstack/context/swift/utils.py - mix-in class that can be"},{"line_number":17,"context_line":"                                             used in other context"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3afb71cf_cb08662b","line":14,"in_reply_to":"5afe65bd_a98d197d","updated":"2015-06-04 23:07:18.000000000","message":"Removed","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"}],"etc/rally/rally.conf.sample":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"77e6943f56e73d89773620e36e3136bd1c3e6051","unresolved":false,"context_lines":[{"line_number":575,"context_line":"[swift_objects_context]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"#"},{"line_number":578,"context_line":"# From rally"},{"line_number":579,"context_line":"#"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"# How many concurrent threads use for serving swift_objects context (integer"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"3acd31a7_c92a657e","line":578,"updated":"2015-05-03 10:45:44.000000000","message":"From rally? Hm?","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"7fe175c21bf7cedeeabde4bf4088c822c382a639","unresolved":false,"context_lines":[{"line_number":575,"context_line":"[swift_objects_context]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"#"},{"line_number":578,"context_line":"# From rally"},{"line_number":579,"context_line":"#"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"# How many concurrent threads use for serving swift_objects context (integer"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"9a0c5dc1_9b6e0dc8","line":578,"in_reply_to":"3acd31a7_c92a657e","updated":"2015-05-14 00:16:40.000000000","message":"Entire section removed.","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"}],"rally/benchmark/context/objects.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"77e6943f56e73d89773620e36e3136bd1c3e6051","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"context_opts \u003d ["},{"line_number":35,"context_line":"    cfg.IntOpt(\"resource_management_workers\","},{"line_number":36,"context_line":"               default\u003d30,"},{"line_number":37,"context_line":"               help\u003d\"How many concurrent threads use for serving \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_a92169a1","line":34,"updated":"2015-05-03 10:45:44.000000000","message":"Do we actually need to have this parametrized from rally.conf ? maybe just pass it in context?","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"7fe175c21bf7cedeeabde4bf4088c822c382a639","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"context_opts \u003d ["},{"line_number":35,"context_line":"    cfg.IntOpt(\"resource_management_workers\","},{"line_number":36,"context_line":"               default\u003d30,"},{"line_number":37,"context_line":"               help\u003d\"How many concurrent threads use for serving \""}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad8896b_5d79e72e","line":34,"in_reply_to":"3acd31a7_a92169a1","updated":"2015-05-14 00:16:40.000000000","message":"Done, removed parametrized from rally.conf.","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"77e6943f56e73d89773620e36e3136bd1c3e6051","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"@base.context(name\u003d\"swift_objects\", order\u003d360)"},{"line_number":48,"context_line":"class ObjectGenerator(base.Context):"},{"line_number":49,"context_line":"    CONFIG_SCHEMA \u003d {"},{"line_number":50,"context_line":"        \"type\": \"object\","},{"line_number":51,"context_line":"        \"$schema\": consts.JSON_SCHEMA,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_6915913e","line":48,"updated":"2015-05-03 10:45:44.000000000","message":"SwiftObjectGenerator","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"7fe175c21bf7cedeeabde4bf4088c822c382a639","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"@base.context(name\u003d\"swift_objects\", order\u003d360)"},{"line_number":48,"context_line":"class ObjectGenerator(base.Context):"},{"line_number":49,"context_line":"    CONFIG_SCHEMA \u003d {"},{"line_number":50,"context_line":"        \"type\": \"object\","},{"line_number":51,"context_line":"        \"$schema\": consts.JSON_SCHEMA,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad8896b_fd8e5326","line":48,"in_reply_to":"3acd31a7_6915913e","updated":"2015-05-14 00:16:40.000000000","message":"Done","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"c880a829029a113a55b46a28ae8cb38396cff342","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            \"resource_management_workers\","},{"line_number":80,"context_line":"            cfg.CONF.users_context.resource_management_workers)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _create_containers(self):"},{"line_number":83,"context_line":"        threads \u003d self.config[\"resource_management_workers\"]"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        containers \u003d collections.deque()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_5a3731e3","line":82,"updated":"2015-05-03 22:31:15.000000000","message":"Could we move such methods in separate place. For example benchmark/scenarios/swift/utils.py As I understand this methods could be used in scenarios?","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"3679dfff22defe974c6f1bc57f10bdba6a484fc6","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            \"resource_management_workers\","},{"line_number":80,"context_line":"            cfg.CONF.users_context.resource_management_workers)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _create_containers(self):"},{"line_number":83,"context_line":"        threads \u003d self.config[\"resource_management_workers\"]"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        containers \u003d collections.deque()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_bb09a4df","line":82,"in_reply_to":"3acd31a7_5a3731e3","updated":"2015-05-04 08:19:06.000000000","message":"*  For example benchmark/context/swift/utils.py","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"7fe175c21bf7cedeeabde4bf4088c822c382a639","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            \"resource_management_workers\","},{"line_number":80,"context_line":"            cfg.CONF.users_context.resource_management_workers)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _create_containers(self):"},{"line_number":83,"context_line":"        threads \u003d self.config[\"resource_management_workers\"]"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        containers \u003d collections.deque()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_0ecaaf6d","line":82,"in_reply_to":"3acd31a7_bb09a4df","updated":"2015-05-14 00:16:40.000000000","message":"I have split it into two files:\n- benchmark/context/swift/objects.py\n- benchmark/context/swift/utils.py\n\nModel like the scenarios, made utils.py as the base class for objects.py but the way how it inherits, it\u0027s causing some problem for unit test because of the setup and cleanup abc.abstractmethod.  I\u0027m not sure what would be the best way to implement so it\u0027s not so awkward.","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"77e6943f56e73d89773620e36e3136bd1c3e6051","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        with tempfile.TemporaryFile() as dummy_file:"},{"line_number":141,"context_line":"            # set dummy file to specified object size"},{"line_number":142,"context_line":"            dummy_file.truncate(self.config[\"object_size\"])"},{"line_number":143,"context_line":"            broker.run(publish, consume, threads)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        objects_count \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_89246daf","line":142,"updated":"2015-05-03 10:45:44.000000000","message":"Yep this magic with dumm_file will work, but for 99% of developers it won\u0027t be clear why. \n\nI believe it will be simpler to understand if we move \n\n  with templatefile.TemporaryFile() as dummy_file: \n\nbefore \n\n  def publish()","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"7fe175c21bf7cedeeabde4bf4088c822c382a639","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        with tempfile.TemporaryFile() as dummy_file:"},{"line_number":141,"context_line":"            # set dummy file to specified object size"},{"line_number":142,"context_line":"            dummy_file.truncate(self.config[\"object_size\"])"},{"line_number":143,"context_line":"            broker.run(publish, consume, threads)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        objects_count \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_ca518310","line":142,"in_reply_to":"3acd31a7_89246daf","updated":"2015-05-14 00:16:40.000000000","message":"Done","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"c880a829029a113a55b46a28ae8cb38396cff342","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            broker.run(publish, consume, threads)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        objects_count \u003d 0"},{"line_number":146,"context_line":"        for o in objects:"},{"line_number":147,"context_line":"            for container in self.context[\"tenants\"]["},{"line_number":148,"context_line":"                    o[\"tenant_id\"]][\"containers\"]:"},{"line_number":149,"context_line":"                if container[\"container\"] \u003d\u003d o[\"container\"]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_fa271db4","line":146,"updated":"2015-05-03 22:31:15.000000000","message":"o not very good name for index","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"7fe175c21bf7cedeeabde4bf4088c822c382a639","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            broker.run(publish, consume, threads)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        objects_count \u003d 0"},{"line_number":146,"context_line":"        for o in objects:"},{"line_number":147,"context_line":"            for container in self.context[\"tenants\"]["},{"line_number":148,"context_line":"                    o[\"tenant_id\"]][\"containers\"]:"},{"line_number":149,"context_line":"                if container[\"container\"] \u003d\u003d o[\"container\"]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_2dadd988","line":146,"in_reply_to":"3acd31a7_fa271db4","updated":"2015-05-14 00:16:40.000000000","message":"Code restructured, no longer applicable.","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"77e6943f56e73d89773620e36e3136bd1c3e6051","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        objects_count \u003d 0"},{"line_number":146,"context_line":"        for o in objects:"},{"line_number":147,"context_line":"            for container in self.context[\"tenants\"]["},{"line_number":148,"context_line":"                    o[\"tenant_id\"]][\"containers\"]:"},{"line_number":149,"context_line":"                if container[\"container\"] \u003d\u003d o[\"container\"]:"},{"line_number":150,"context_line":"                    container[\"objects\"].append(o[\"object\"])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_493e55b9","line":147,"updated":"2015-05-03 10:45:44.000000000","message":"So I see that use approach of users context. But it\u0027s not nicely written. \n\nMostly because list.append() is threadsafe operation so we can append inside the consume operation directly to this method. \nWhich I would prefer to see here (and in users context someday)..","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"7fe175c21bf7cedeeabde4bf4088c822c382a639","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        objects_count \u003d 0"},{"line_number":146,"context_line":"        for o in objects:"},{"line_number":147,"context_line":"            for container in self.context[\"tenants\"]["},{"line_number":148,"context_line":"                    o[\"tenant_id\"]][\"containers\"]:"},{"line_number":149,"context_line":"                if container[\"container\"] \u003d\u003d o[\"container\"]:"},{"line_number":150,"context_line":"                    container[\"objects\"].append(o[\"object\"])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_ce05b77a","line":147,"in_reply_to":"3acd31a7_493e55b9","updated":"2015-05-14 00:16:40.000000000","message":"I have moved the Rally context update inside consume operation, please let me know if there anything I missed that we can improve.","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"c880a829029a113a55b46a28ae8cb38396cff342","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        return objects_count"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _delete_containers(self):"},{"line_number":156,"context_line":"        threads \u003d self.config[\"resource_management_workers\"]"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        def publish(queue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_5a3e11b9","line":155,"updated":"2015-05-03 22:31:15.000000000","message":"Common practice to implement this function in benchmark/context/cleanup/resources.py","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"7fe175c21bf7cedeeabde4bf4088c822c382a639","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        return objects_count"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _delete_containers(self):"},{"line_number":156,"context_line":"        threads \u003d self.config[\"resource_management_workers\"]"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        def publish(queue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_ad40a908","line":155,"in_reply_to":"3acd31a7_5a3e11b9","updated":"2015-05-14 00:16:40.000000000","message":"Delete container and delete object already exist in benchmark/context/cleanup/resource.py library.  The two functions here are meant to only delete what was created by the swift context.","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"c880a829029a113a55b46a28ae8cb38396cff342","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        for tenant_id in self.context[\"tenants\"]:"},{"line_number":174,"context_line":"            self.context[\"tenants\"][tenant_id][\"containers\"] \u003d []"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def _delete_objects(self):"},{"line_number":177,"context_line":"        threads \u003d self.config[\"resource_management_workers\"]"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        def publish(queue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_1a48995a","line":176,"updated":"2015-05-03 22:31:15.000000000","message":"Common practice to implement this functions in benchmark/context/cleanup/resources.py","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"77e6943f56e73d89773620e36e3136bd1c3e6051","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if containers_count \u003c containers_num:"},{"line_number":211,"context_line":"            raise exceptions.ContextSetupFailure("},{"line_number":212,"context_line":"                ctx_name\u003dself.get_name(),"},{"line_number":213,"context_line":"                msg\u003d_(\"Failed to create the requested number of containers.\"))"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        objects_num \u003d containers_num * self.config[\"objects_per_container\"]"},{"line_number":216,"context_line":"        LOG.debug(\"Creating %(objects_num)d objects using %(threads)d threads\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_c9782592","line":213,"updated":"2015-05-03 10:45:44.000000000","message":"Could you print here what was required and what was actual","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"7fe175c21bf7cedeeabde4bf4088c822c382a639","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if containers_count \u003c containers_num:"},{"line_number":211,"context_line":"            raise exceptions.ContextSetupFailure("},{"line_number":212,"context_line":"                ctx_name\u003dself.get_name(),"},{"line_number":213,"context_line":"                msg\u003d_(\"Failed to create the requested number of containers.\"))"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        objects_num \u003d containers_num * self.config[\"objects_per_container\"]"},{"line_number":216,"context_line":"        LOG.debug(\"Creating %(objects_num)d objects using %(threads)d threads\""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_4a3eb3b9","line":213,"in_reply_to":"3acd31a7_c9782592","updated":"2015-05-14 00:16:40.000000000","message":"Done","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"77e6943f56e73d89773620e36e3136bd1c3e6051","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        if objects_count \u003c objects_num:"},{"line_number":220,"context_line":"            raise exceptions.ContextSetupFailure("},{"line_number":221,"context_line":"                ctx_name\u003dself.get_name(),"},{"line_number":222,"context_line":"                msg\u003d_(\"Failed to create the requested number of objects.\"))"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    @rutils.log_task_wrapper(LOG.info, _(\"Exit context: `swift_objects`\"))"},{"line_number":225,"context_line":"    def cleanup(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_e9752198","line":222,"updated":"2015-05-03 10:45:44.000000000","message":"could you print here what was the required number and what was the actual","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"7fe175c21bf7cedeeabde4bf4088c822c382a639","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        if objects_count \u003c objects_num:"},{"line_number":220,"context_line":"            raise exceptions.ContextSetupFailure("},{"line_number":221,"context_line":"                ctx_name\u003dself.get_name(),"},{"line_number":222,"context_line":"                msg\u003d_(\"Failed to create the requested number of objects.\"))"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    @rutils.log_task_wrapper(LOG.info, _(\"Exit context: `swift_objects`\"))"},{"line_number":225,"context_line":"    def cleanup(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_0a48bb5a","line":222,"in_reply_to":"3acd31a7_e9752198","updated":"2015-05-14 00:16:40.000000000","message":"Done","commit_id":"1c74a1aeb8a521e0c0bd7bc52d96e52a7c691bf1"}],"rally/plugins/openstack/context/swift/objects.py":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"86c90b2e0083ee418941d0b311f3fe33d65b10c4","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __init__(self, context):"},{"line_number":54,"context_line":"        super(SwiftObjectGenerator, self).__init__(context)"},{"line_number":55,"context_line":"        self.config.setdefault(\"containers_per_tenant\", 1)"},{"line_number":56,"context_line":"        self.config.setdefault(\"objects_per_container\", 1)"},{"line_number":57,"context_line":"        self.config.setdefault(\"object_size\", 1024)"},{"line_number":58,"context_line":"        self.config.setdefault(\"resource_management_workers\", 30)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_d6c9b77a","line":55,"updated":"2015-05-28 15:01:20.000000000","message":"These defaults can be set in property DEFAULT_CONFIG\n\nhttps://github.com/openstack/rally/blob/master/rally/benchmark/context/base.py#L71-L73","commit_id":"f86a5648a4792af2b44424bb6ceeaf297e13f8f3"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"01759afcd416ef4c735d5f511c75ebfd44539465","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __init__(self, context):"},{"line_number":54,"context_line":"        super(SwiftObjectGenerator, self).__init__(context)"},{"line_number":55,"context_line":"        self.config.setdefault(\"containers_per_tenant\", 1)"},{"line_number":56,"context_line":"        self.config.setdefault(\"objects_per_container\", 1)"},{"line_number":57,"context_line":"        self.config.setdefault(\"object_size\", 1024)"},{"line_number":58,"context_line":"        self.config.setdefault(\"resource_management_workers\", 30)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_abfda9b2","line":55,"in_reply_to":"7a016987_d6c9b77a","updated":"2015-05-29 04:03:50.000000000","message":"Thanks, I have forgotten about this capability.","commit_id":"f86a5648a4792af2b44424bb6ceeaf297e13f8f3"}],"rally/plugins/openstack/context/swift/utils.py":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"681e0a9f587412c3185c91f676b706ac3d576ed1","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        return containers"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _create_objects(self, objects_per_container, object_size,"},{"line_number":67,"context_line":"                        threads):"},{"line_number":68,"context_line":"        \"\"\"Create objects and store results in Rally context."},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_6e7b8a7c","line":66,"updated":"2015-05-27 08:50:18.000000000","message":"Please document object_size. In what units is it?","commit_id":"8fde3af4befc7908fb7e0cf1efcbc3a86ee2fdaa"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"445cbde3c0da5e123081ca659d1bf9abfb442569","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        return containers"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _create_objects(self, objects_per_container, object_size,"},{"line_number":67,"context_line":"                        threads):"},{"line_number":68,"context_line":"        \"\"\"Create objects and store results in Rally context."},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_265ebde9","line":66,"in_reply_to":"7a016987_6e7b8a7c","updated":"2015-05-27 20:29:54.000000000","message":"Done","commit_id":"8fde3af4befc7908fb7e0cf1efcbc3a86ee2fdaa"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"681e0a9f587412c3185c91f676b706ac3d576ed1","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        def publish(queue):"},{"line_number":113,"context_line":"            for tenant_id in self.context[\"tenants\"]:"},{"line_number":114,"context_line":"                for container in self.context[\"tenants\"]["},{"line_number":115,"context_line":"                        tenant_id][\"containers\"][:]:"},{"line_number":116,"context_line":"                    args \u003d (container,"},{"line_number":117,"context_line":"                            self.context[\"tenants\"][tenant_id][\"containers\"])"},{"line_number":118,"context_line":"                    queue.append(args)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_2eca3250","line":115,"updated":"2015-05-27 08:50:18.000000000","message":"Why you make here shallow copy of list?","commit_id":"8fde3af4befc7908fb7e0cf1efcbc3a86ee2fdaa"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"445cbde3c0da5e123081ca659d1bf9abfb442569","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        def publish(queue):"},{"line_number":113,"context_line":"            for tenant_id in self.context[\"tenants\"]:"},{"line_number":114,"context_line":"                for container in self.context[\"tenants\"]["},{"line_number":115,"context_line":"                        tenant_id][\"containers\"][:]:"},{"line_number":116,"context_line":"                    args \u003d (container,"},{"line_number":117,"context_line":"                            self.context[\"tenants\"][tenant_id][\"containers\"])"},{"line_number":118,"context_line":"                    queue.append(args)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_2bc8cb73","line":115,"in_reply_to":"7a016987_2eca3250","updated":"2015-05-27 20:29:54.000000000","message":"The reason for the shallow copy is because the items in the original list was getting updated by consume function as the containers are getting deleted concurrently.  Without copy, we may run into race condition where some of the containers won\u0027t get added to the publish queue for deletion.","commit_id":"8fde3af4befc7908fb7e0cf1efcbc3a86ee2fdaa"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"86c90b2e0083ee418941d0b311f3fe33d65b10c4","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    \"\"\"Base class for Swift context.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, context):"},{"line_number":29,"context_line":"        super(SwiftContext, self).__init__(context)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _create_containers(self, containers_per_tenant, threads):"},{"line_number":32,"context_line":"        \"\"\"Create containers and store results in Rally context."}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_bb2066f8","line":29,"updated":"2015-05-28 15:01:20.000000000","message":"L28-29 do nothing and can be removed","commit_id":"f86a5648a4792af2b44424bb6ceeaf297e13f8f3"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"01759afcd416ef4c735d5f511c75ebfd44539465","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    \"\"\"Base class for Swift context.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, context):"},{"line_number":29,"context_line":"        super(SwiftContext, self).__init__(context)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _create_containers(self, containers_per_tenant, threads):"},{"line_number":32,"context_line":"        \"\"\"Create containers and store results in Rally context."}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_6bf4515a","line":29,"in_reply_to":"7a016987_bb2066f8","updated":"2015-05-29 04:03:50.000000000","message":"Done","commit_id":"f86a5648a4792af2b44424bb6ceeaf297e13f8f3"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"86c90b2e0083ee418941d0b311f3fe33d65b10c4","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        broker.run(publish, consume, threads)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def setup(self):"},{"line_number":158,"context_line":"        pass"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def cleanup(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_3657eb03","line":157,"updated":"2015-05-28 15:01:20.000000000","message":"Both `setup\u0027 and `cleanup\u0027 can be removed in this class, since this class is for inheritance only and will never be instantiated","commit_id":"f86a5648a4792af2b44424bb6ceeaf297e13f8f3"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"246c6ac14088c726c3f3dc2e3ad21a30d6b261e6","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        broker.run(publish, consume, threads)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def setup(self):"},{"line_number":158,"context_line":"        pass"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def cleanup(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_240b202c","line":157,"in_reply_to":"7a016987_3657eb03","updated":"2015-05-28 23:52:48.000000000","message":"These are required by the ABC meta, since they are abstract in base.Context.","commit_id":"f86a5648a4792af2b44424bb6ceeaf297e13f8f3"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"01759afcd416ef4c735d5f511c75ebfd44539465","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        broker.run(publish, consume, threads)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def setup(self):"},{"line_number":158,"context_line":"        pass"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def cleanup(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_ac7a5cef","line":157,"in_reply_to":"7a016987_3657eb03","updated":"2015-05-29 04:03:50.000000000","message":"Yes, these two functions was only implemented for the purpose of unit test since I\u0027m testing it as standalone module.  I have removed them and made the class mix-in instead.","commit_id":"f86a5648a4792af2b44424bb6ceeaf297e13f8f3"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"94815df640c471c0411d5dbe9da174be1229d7ae","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        :param objects_per_container: int, number of objects to create"},{"line_number":67,"context_line":"                                      per container"},{"line_number":68,"context_line":"        :param object_size: int, temporary local object size in byte"},{"line_number":69,"context_line":"        :param threads: int, number of threads to use for broker pattern"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        :returns: list of tuples containing (account, container, object)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_b55ba385","line":68,"updated":"2015-05-29 15:57:38.000000000","message":"Is it size of created objects?","commit_id":"7bd4ebf4ad59fabd83e4ba1fb25d276d32afc145"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"25a5faa13c14596609a019991b22a22c50601904","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        :param objects_per_container: int, number of objects to create"},{"line_number":67,"context_line":"                                      per container"},{"line_number":68,"context_line":"        :param object_size: int, temporary local object size in byte"},{"line_number":69,"context_line":"        :param threads: int, number of threads to use for broker pattern"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        :returns: list of tuples containing (account, container, object)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5afe65bd_2165c344","line":68,"in_reply_to":"5afe65bd_a6a0a991","updated":"2015-06-02 09:46:20.000000000","message":"Done, sorry for misunderstood your intention earlier.","commit_id":"7bd4ebf4ad59fabd83e4ba1fb25d276d32afc145"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"d9483b4162d67b7446c9d77af817a9fbd4727719","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        :param objects_per_container: int, number of objects to create"},{"line_number":67,"context_line":"                                      per container"},{"line_number":68,"context_line":"        :param object_size: int, temporary local object size in byte"},{"line_number":69,"context_line":"        :param threads: int, number of threads to use for broker pattern"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        :returns: list of tuples containing (account, container, object)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5afe65bd_a6a0a991","line":68,"in_reply_to":"7a016987_a8b6a53b","updated":"2015-06-02 08:57:55.000000000","message":"I mean this should be in description. \"size of created swift objects\" instead of \"temporary local object\"","commit_id":"7bd4ebf4ad59fabd83e4ba1fb25d276d32afc145"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"559994a46bf12273c203dc69e4ef5877b0fee39a","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        :param objects_per_container: int, number of objects to create"},{"line_number":67,"context_line":"                                      per container"},{"line_number":68,"context_line":"        :param object_size: int, temporary local object size in byte"},{"line_number":69,"context_line":"        :param threads: int, number of threads to use for broker pattern"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        :returns: list of tuples containing (account, container, object)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_a8b6a53b","line":68,"in_reply_to":"7a016987_b55ba385","updated":"2015-05-29 17:02:02.000000000","message":"Yes, the script will create a temporary file and truncate the size in bytes to the value of \"object_size\".","commit_id":"7bd4ebf4ad59fabd83e4ba1fb25d276d32afc145"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"0c615bb07bec3913dd5b35fe825d99c626132aa0","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        objects \u003d []"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        with tempfile.TemporaryFile() as dummy_file:"},{"line_number":76,"context_line":"            # set dummy file to specified object size"},{"line_number":77,"context_line":"            dummy_file.truncate(object_size)"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_a90079ab","line":75,"updated":"2015-06-02 10:34:35.000000000","message":"Well, I see no reason to actually create a TemporaryFile here as you only need a file-like object with a semi-random content.\n\nYou can actually implement a `file\u0027 class interface necessary for this task exactly. I\u0027m almost sure there is a ready-to-be-used implementation.","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"9d71ea89f7c77269b04f392d1e2998e20a771baf","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        objects \u003d []"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        with tempfile.TemporaryFile() as dummy_file:"},{"line_number":76,"context_line":"            # set dummy file to specified object size"},{"line_number":77,"context_line":"            dummy_file.truncate(object_size)"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_54138866","line":75,"in_reply_to":"5afe65bd_a90079ab","updated":"2015-06-04 23:07:18.000000000","message":"I have tried few different ways previously but found using tempfile module was the simplest without much codes and doesn\u0027t use much resources if generating a very large file.\n\nMaybe I missing something or not looking at the right place, do you have any suggestion or example?","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"cfaf37ae9fef4df5203ce4299a284718c560dc8f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015: Cisco Systems, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a41bdd9_2c6235d9","line":1,"updated":"2015-07-17 21:54:55.000000000","message":"Change please copy rights","commit_id":"5f3e3e5d86196204908ff564a3ce675b59d274f7"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"906789a3dc2a40679c7d1de05d44e9e6eddeb606","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015: Cisco Systems, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a41bdd9_4c53f939","line":1,"in_reply_to":"9a41bdd9_2c6235d9","updated":"2015-07-18 06:02:28.000000000","message":"We see something similar in other file, like this one here:\n\nhttps://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenario.py#L1\n\nWhat is the correct way to put copy rights?","commit_id":"5f3e3e5d86196204908ff564a3ce675b59d274f7"},{"author":{"_account_id":8840,"name":"Carlos L. Torres","email":"carlos.torres@rackspace.com","username":"carl6796"},"change_message_id":"d293247bfe3066b2324d91c0f735c47c6ba4159e","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            def publish(queue):"},{"line_number":78,"context_line":"                for tenant_id in self.context[\"tenants\"]:"},{"line_number":79,"context_line":"                    for container in self.context[\"tenants\"]["},{"line_number":80,"context_line":"                            tenant_id][\"containers\"]:"},{"line_number":81,"context_line":"                        for i in range(objects_per_container):"},{"line_number":82,"context_line":"                            queue.append(container)"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a41bdd9_2f154c48","line":80,"updated":"2015-07-17 20:25:16.000000000","message":"nitpick:\n\nThis is hard to read, and the line break is awkward. Can you instead extract this to its own variable.\n\nSomething like:\n\n  tenants \u003d self.context[\"tenants\"]\n  for tenant_id in tenants:\n      containers \u003d tenants[tenant_id][\"containers\"]\n      for container in containers:\n          .....","commit_id":"5f3e3e5d86196204908ff564a3ce675b59d274f7"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"906789a3dc2a40679c7d1de05d44e9e6eddeb606","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            def publish(queue):"},{"line_number":78,"context_line":"                for tenant_id in self.context[\"tenants\"]:"},{"line_number":79,"context_line":"                    for container in self.context[\"tenants\"]["},{"line_number":80,"context_line":"                            tenant_id][\"containers\"]:"},{"line_number":81,"context_line":"                        for i in range(objects_per_container):"},{"line_number":82,"context_line":"                            queue.append(container)"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a41bdd9_927cb321","line":80,"in_reply_to":"9a41bdd9_2f154c48","updated":"2015-07-18 06:02:28.000000000","message":"Done","commit_id":"5f3e3e5d86196204908ff564a3ce675b59d274f7"},{"author":{"_account_id":8840,"name":"Carlos L. Torres","email":"carlos.torres@rackspace.com","username":"carl6796"},"change_message_id":"d293247bfe3066b2324d91c0f735c47c6ba4159e","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                for container in self.context[\"tenants\"]["},{"line_number":109,"context_line":"                        tenant_id][\"containers\"][:]:"},{"line_number":110,"context_line":"                    args \u003d (container,"},{"line_number":111,"context_line":"                            self.context[\"tenants\"][tenant_id][\"containers\"])"},{"line_number":112,"context_line":"                    queue.append(args)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        def consume(cache, args):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a41bdd9_8a6246d7","line":111,"updated":"2015-07-17 20:25:16.000000000","message":"Same as above","commit_id":"5f3e3e5d86196204908ff564a3ce675b59d274f7"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"906789a3dc2a40679c7d1de05d44e9e6eddeb606","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                for container in self.context[\"tenants\"]["},{"line_number":109,"context_line":"                        tenant_id][\"containers\"][:]:"},{"line_number":110,"context_line":"                    args \u003d (container,"},{"line_number":111,"context_line":"                            self.context[\"tenants\"][tenant_id][\"containers\"])"},{"line_number":112,"context_line":"                    queue.append(args)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        def consume(cache, args):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a41bdd9_b277773a","line":111,"in_reply_to":"9a41bdd9_8a6246d7","updated":"2015-07-18 06:02:28.000000000","message":"Done","commit_id":"5f3e3e5d86196204908ff564a3ce675b59d274f7"},{"author":{"_account_id":8840,"name":"Carlos L. Torres","email":"carlos.torres@rackspace.com","username":"carl6796"},"change_message_id":"d293247bfe3066b2324d91c0f735c47c6ba4159e","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            for tenant_id in self.context[\"tenants\"]:"},{"line_number":131,"context_line":"                for container in self.context[\"tenants\"]["},{"line_number":132,"context_line":"                        tenant_id][\"containers\"]:"},{"line_number":133,"context_line":"                    for object_name in container[\"objects\"][:]:"},{"line_number":134,"context_line":"                        args \u003d object_name, container"},{"line_number":135,"context_line":"                        queue.append(args)"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a41bdd9_2aa8dada","line":133,"updated":"2015-07-17 20:25:16.000000000","message":"Again, same as above.","commit_id":"5f3e3e5d86196204908ff564a3ce675b59d274f7"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"906789a3dc2a40679c7d1de05d44e9e6eddeb606","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            for tenant_id in self.context[\"tenants\"]:"},{"line_number":131,"context_line":"                for container in self.context[\"tenants\"]["},{"line_number":132,"context_line":"                        tenant_id][\"containers\"]:"},{"line_number":133,"context_line":"                    for object_name in container[\"objects\"][:]:"},{"line_number":134,"context_line":"                        args \u003d object_name, container"},{"line_number":135,"context_line":"                        queue.append(args)"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a41bdd9_52762b3f","line":133,"in_reply_to":"9a41bdd9_2aa8dada","updated":"2015-07-18 06:02:28.000000000","message":"Done","commit_id":"5f3e3e5d86196204908ff564a3ce675b59d274f7"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"332e60016edbd8c9649185d20ccde3a16bdac8a9","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            tenants \u003d self.context[\"tenants\"]"},{"line_number":109,"context_line":"            for tenant_id in tenants:"},{"line_number":110,"context_line":"                containers \u003d tenants[tenant_id][\"containers\"]"},{"line_number":111,"context_line":"                for container in containers[:]:"},{"line_number":112,"context_line":"                    args \u003d container, containers"},{"line_number":113,"context_line":"                    queue.append(args)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_286820f5","line":111,"updated":"2015-07-20 03:06:15.000000000","message":"why using [:] here?","commit_id":"544878b1b75a519a18f01a18b16062800c914e85"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"a7642dbcad350096af69490dfeabc1f95ecfab6b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            tenants \u003d self.context[\"tenants\"]"},{"line_number":109,"context_line":"            for tenant_id in tenants:"},{"line_number":110,"context_line":"                containers \u003d tenants[tenant_id][\"containers\"]"},{"line_number":111,"context_line":"                for container in containers[:]:"},{"line_number":112,"context_line":"                    args \u003d container, containers"},{"line_number":113,"context_line":"                    queue.append(args)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_cd096097","line":111,"in_reply_to":"3a50d1a3_286820f5","updated":"2015-07-20 21:56:15.000000000","message":"The reason we are using [:] is because the items in the original list are getting updated by the consume function as the containers/objects are getting deleted concurrently. Without copy, we may run into race condition where some of the containers/objects won\u0027t get added to the publish queue for deletion.\n\nAs you pointed out, if we do not need to cleanup the swift’s context values then copy is not needed here.","commit_id":"544878b1b75a519a18f01a18b16062800c914e85"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"b03d4d9f9a7bf54362558e5583622991690c0494","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            tenants \u003d self.context[\"tenants\"]"},{"line_number":109,"context_line":"            for tenant_id in tenants:"},{"line_number":110,"context_line":"                containers \u003d tenants[tenant_id][\"containers\"]"},{"line_number":111,"context_line":"                for container in containers[:]:"},{"line_number":112,"context_line":"                    args \u003d container, containers"},{"line_number":113,"context_line":"                    queue.append(args)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_e3dd4443","line":111,"in_reply_to":"3a50d1a3_cd096097","updated":"2015-07-21 00:30:13.000000000","message":"nice tips :)","commit_id":"544878b1b75a519a18f01a18b16062800c914e85"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"332e60016edbd8c9649185d20ccde3a16bdac8a9","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            for tenant_id in tenants:"},{"line_number":133,"context_line":"                containers \u003d tenants[tenant_id][\"containers\"]"},{"line_number":134,"context_line":"                for container in containers:"},{"line_number":135,"context_line":"                    for object_name in container[\"objects\"][:]:"},{"line_number":136,"context_line":"                        args \u003d object_name, container"},{"line_number":137,"context_line":"                        queue.append(args)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_e871d8e1","line":135,"updated":"2015-07-20 03:06:15.000000000","message":"same as L111","commit_id":"544878b1b75a519a18f01a18b16062800c914e85"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"a7642dbcad350096af69490dfeabc1f95ecfab6b","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            for tenant_id in tenants:"},{"line_number":133,"context_line":"                containers \u003d tenants[tenant_id][\"containers\"]"},{"line_number":134,"context_line":"                for container in containers:"},{"line_number":135,"context_line":"                    for object_name in container[\"objects\"][:]:"},{"line_number":136,"context_line":"                        args \u003d object_name, container"},{"line_number":137,"context_line":"                        queue.append(args)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_0d4748bc","line":135,"in_reply_to":"3a50d1a3_e871d8e1","updated":"2015-07-20 21:56:15.000000000","message":"Same as above","commit_id":"544878b1b75a519a18f01a18b16062800c914e85"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"ad3a7e7c74c1fdf02e21645f64a7a76dc26ddcc4","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from rally.plugins.openstack.scenarios.swift import utils as swift_utils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class SwiftObjectMixin(object):"},{"line_number":24,"context_line":"    \"\"\"Mix-in method for Swift Object Context.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _create_containers(self, containers_per_tenant, threads):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_07a42c55","line":23,"updated":"2015-08-03 21:24:17.000000000","message":"Why do we need this Mixin and can\u0027t just keep this in context?","commit_id":"b0554b07994aedbc4d66ca45cd92fbfba575ad88"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"e512e99bd5b1a28422d6d63189df6cdc11d7677b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from rally.plugins.openstack.scenarios.swift import utils as swift_utils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class SwiftObjectMixin(object):"},{"line_number":24,"context_line":"    \"\"\"Mix-in method for Swift Object Context.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _create_containers(self, containers_per_tenant, threads):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_e2400e0a","line":23,"in_reply_to":"1a4dcd0f_07a42c55","updated":"2015-08-04 02:17:04.000000000","message":"Splitting to Mixin function was suggested by another reviewer earlier.  I can revert back keeping it in one context file if it makes more sense.","commit_id":"b0554b07994aedbc4d66ca45cd92fbfba575ad88"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"36836c2a8cdea3d41672bc5eda41f24cfdcd6b10","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from rally.plugins.openstack.scenarios.swift import utils as swift_utils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class SwiftObjectMixin(object):"},{"line_number":24,"context_line":"    \"\"\"Mix-in method for Swift Object Context.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _create_containers(self, containers_per_tenant, threads):"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_ad98f978","line":23,"in_reply_to":"1a4dcd0f_e2400e0a","updated":"2015-09-01 00:18:16.000000000","message":"Sorry for long reply, I missed notification that you reply me. \n\nSo the thing is that we can do both keep this separated (which is not bad idea) or merge code inside context. \n\nIf we decide to keep it as a separated code (which is not a bad idea) then we need to refactor this. \n\nWhat you should refactor is stop using self.context.get(\"users\") and other self.* stuff (send them via method arguments instead).","commit_id":"b0554b07994aedbc4d66ca45cd92fbfba575ad88"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"ad3a7e7c74c1fdf02e21645f64a7a76dc26ddcc4","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        def publish(queue):"},{"line_number":38,"context_line":"            for user, tenant_id in (rutils.iterate_per_tenants("},{"line_number":39,"context_line":"                    self.context.get(\"users\", []))):"},{"line_number":40,"context_line":"                self.context[\"tenants\"][tenant_id][\"containers\"] \u003d []"},{"line_number":41,"context_line":"                for i in range(containers_per_tenant):"},{"line_number":42,"context_line":"                    args \u003d (user,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_479a3416","line":39,"updated":"2015-08-03 21:24:17.000000000","message":"This is actually antipatern. \n\nWe shouldn\u0027t access fields that don\u0027t exist in mixing (I am talking about self.context) \n\nYou should pass this variable as a parameter of this function.","commit_id":"b0554b07994aedbc4d66ca45cd92fbfba575ad88"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"e512e99bd5b1a28422d6d63189df6cdc11d7677b","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        def publish(queue):"},{"line_number":38,"context_line":"            for user, tenant_id in (rutils.iterate_per_tenants("},{"line_number":39,"context_line":"                    self.context.get(\"users\", []))):"},{"line_number":40,"context_line":"                self.context[\"tenants\"][tenant_id][\"containers\"] \u003d []"},{"line_number":41,"context_line":"                for i in range(containers_per_tenant):"},{"line_number":42,"context_line":"                    args \u003d (user,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_82eeeaea","line":39,"in_reply_to":"1a4dcd0f_479a3416","updated":"2015-08-04 02:17:04.000000000","message":"If we are reverting back to single context file, I\u0027m guessing this probably would not apply anymore.","commit_id":"b0554b07994aedbc4d66ca45cd92fbfba575ad88"}],"tests/unit/plugins/openstack/context/swift/test_objects.py":[{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"0c615bb07bec3913dd5b35fe825d99c626132aa0","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        }"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        objects_ctx \u003d objects.SwiftObjectGenerator(context)"},{"line_number":52,"context_line":"        objects_ctx.setup()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        for tenant_id in context[\"tenants\"]:"},{"line_number":55,"context_line":"            containers \u003d context[\"tenants\"][tenant_id][\"containers\"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_4c0c7394","line":52,"updated":"2015-06-02 10:34:35.000000000","message":"I would prefer you to have at least some of the assertions on calls on mock_osclients.","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"9d71ea89f7c77269b04f392d1e2998e20a771baf","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        }"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        objects_ctx \u003d objects.SwiftObjectGenerator(context)"},{"line_number":52,"context_line":"        objects_ctx.setup()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        for tenant_id in context[\"tenants\"]:"},{"line_number":55,"context_line":"            containers \u003d context[\"tenants\"][tenant_id][\"containers\"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_737cca20","line":52,"in_reply_to":"5afe65bd_4c0c7394","updated":"2015-06-04 23:07:18.000000000","message":"Done","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"0c615bb07bec3913dd5b35fe825d99c626132aa0","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        }"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        objects_ctx \u003d objects.SwiftObjectGenerator(context)"},{"line_number":91,"context_line":"        objects_ctx.cleanup()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        for tenant_id in context[\"tenants\"]:"},{"line_number":94,"context_line":"            self.assertEqual(0,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_cc2063fa","line":91,"updated":"2015-06-02 10:34:35.000000000","message":"And here as well.","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"9d71ea89f7c77269b04f392d1e2998e20a771baf","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        }"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        objects_ctx \u003d objects.SwiftObjectGenerator(context)"},{"line_number":91,"context_line":"        objects_ctx.cleanup()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        for tenant_id in context[\"tenants\"]:"},{"line_number":94,"context_line":"            self.assertEqual(0,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_5379ce2e","line":91,"in_reply_to":"5afe65bd_cc2063fa","updated":"2015-06-04 23:07:18.000000000","message":"Done","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"0c615bb07bec3913dd5b35fe825d99c626132aa0","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                             len(context[\"tenants\"][tenant_id][\"containers\"]))"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @mock.patch(SWIFT_UTILS + \".osclients\")"},{"line_number":98,"context_line":"    def test_setup_failure(self, mock_osclients):"},{"line_number":99,"context_line":"        context \u003d {"},{"line_number":100,"context_line":"            \"config\": {"},{"line_number":101,"context_line":"                \"swift_objects\": {"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_691721a4","line":98,"updated":"2015-06-02 10:34:35.000000000","message":"Please split this into `*failure_object\u0027 and `*failure_containers\u0027.","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"9d71ea89f7c77269b04f392d1e2998e20a771baf","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                             len(context[\"tenants\"][tenant_id][\"containers\"]))"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @mock.patch(SWIFT_UTILS + \".osclients\")"},{"line_number":98,"context_line":"    def test_setup_failure(self, mock_osclients):"},{"line_number":99,"context_line":"        context \u003d {"},{"line_number":100,"context_line":"            \"config\": {"},{"line_number":101,"context_line":"                \"swift_objects\": {"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_20492532","line":98,"in_reply_to":"5afe65bd_691721a4","updated":"2015-06-04 23:07:18.000000000","message":"Done","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"0c615bb07bec3913dd5b35fe825d99c626132aa0","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        }"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # create container failure"},{"line_number":120,"context_line":"        with mock.patch("},{"line_number":121,"context_line":"                SWIFT_UTILS +"},{"line_number":122,"context_line":"                \".SwiftObjectMixin._create_containers\") as mock_create_con:"},{"line_number":123,"context_line":"            mock_create_con.return_value \u003d [\"con1\"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_a974f9fc","line":120,"updated":"2015-06-02 10:34:35.000000000","message":"You can use simply:\n objects_ctx \u003d objects.SwiftObjectGenerator(context)\n objects_ctx._create_containers \u003d mock.Mock(return_value\u003d[\"con1\"])","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"9d71ea89f7c77269b04f392d1e2998e20a771baf","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        }"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # create container failure"},{"line_number":120,"context_line":"        with mock.patch("},{"line_number":121,"context_line":"                SWIFT_UTILS +"},{"line_number":122,"context_line":"                \".SwiftObjectMixin._create_containers\") as mock_create_con:"},{"line_number":123,"context_line":"            mock_create_con.return_value \u003d [\"con1\"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_c037f1ae","line":120,"in_reply_to":"5afe65bd_a974f9fc","updated":"2015-06-04 23:07:18.000000000","message":"Done","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"0c615bb07bec3913dd5b35fe825d99c626132aa0","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                    objects_ctx.setup)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        # create object failure"},{"line_number":130,"context_line":"        with mock.patch("},{"line_number":131,"context_line":"                SWIFT_UTILS +"},{"line_number":132,"context_line":"                \".SwiftObjectMixin._create_objects\") as mock_create_obj:"},{"line_number":133,"context_line":"            mock_create_obj.return_value \u003d [\"obj1\", \"obj2\", \"obj3\"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_69f3a174","line":130,"updated":"2015-06-02 10:34:35.000000000","message":"Same here.\n\nPlease avoid introducing new unnecessary `mock_\u0027 variables when you can merely set the instance method to a mock:\n objects_ctx._create_objects \u003d mock.Mock(return_value\u003d[\"obj1\", \"obj2\", \"obj3\"])","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"9d71ea89f7c77269b04f392d1e2998e20a771baf","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                                    objects_ctx.setup)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        # create object failure"},{"line_number":130,"context_line":"        with mock.patch("},{"line_number":131,"context_line":"                SWIFT_UTILS +"},{"line_number":132,"context_line":"                \".SwiftObjectMixin._create_objects\") as mock_create_obj:"},{"line_number":133,"context_line":"            mock_create_obj.return_value \u003d [\"obj1\", \"obj2\", \"obj3\"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_8041f90d","line":130,"in_reply_to":"5afe65bd_69f3a174","updated":"2015-06-04 23:07:18.000000000","message":"Done","commit_id":"96cabc3bafb8f5659f598f3f13247861c00256dc"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"15add3f8d86aeba0ef15c244477bbd1a7e8233d1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            },"},{"line_number":40,"context_line":"            \"task\": {\"uuid\": \"id123\"},"},{"line_number":41,"context_line":"            \"tenants\": {"},{"line_number":42,"context_line":"                \"t1\": {\"name\": \"t1\"},"},{"line_number":43,"context_line":"                \"t2\": {\"name\": \"t2\"}"},{"line_number":44,"context_line":"            },"},{"line_number":45,"context_line":"            \"users\": ["}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_12e1c29a","line":42,"updated":"2015-06-08 11:28:22.000000000","message":"I would recommend to give different values for IDs and names - this will make testing much effective. For example, in some buggy case ID is replaced by name (or vise-versa), but this can not be detected by test.\n\nBetter:\n\n \"tenants\": {\n     \"t1\": {\"name\": \"t1_name\"},\n     ...\n }","commit_id":"86e0075b4506abc71650504012d23ecd3193d44a"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"1daeb4ca970118a83a4ba3f0ba5772936d421289","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            },"},{"line_number":40,"context_line":"            \"task\": {\"uuid\": \"id123\"},"},{"line_number":41,"context_line":"            \"tenants\": {"},{"line_number":42,"context_line":"                \"t1\": {\"name\": \"t1\"},"},{"line_number":43,"context_line":"                \"t2\": {\"name\": \"t2\"}"},{"line_number":44,"context_line":"            },"},{"line_number":45,"context_line":"            \"users\": ["}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_8b10ca02","line":42,"in_reply_to":"3afb71cf_12e1c29a","updated":"2015-06-09 02:10:25.000000000","message":"Done","commit_id":"86e0075b4506abc71650504012d23ecd3193d44a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"15add3f8d86aeba0ef15c244477bbd1a7e8233d1","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        for tenant_id in context[\"tenants\"]:"},{"line_number":94,"context_line":"            self.assertEqual(0,"},{"line_number":95,"context_line":"                             len(context[\"tenants\"][tenant_id][\"containers\"]))"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @mock.patch(SWIFT_UTILS + \".osclients.Clients\")"},{"line_number":98,"context_line":"    def test_setup_failure_osclients_put_container(self, mock_osclients):"},{"line_number":99,"context_line":"        context \u003d {"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_8d44771b","line":96,"updated":"2015-06-08 11:28:22.000000000","message":"It is also important to check that methods _delete_container and _delete_object of swift scenario were called","commit_id":"86e0075b4506abc71650504012d23ecd3193d44a"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"1daeb4ca970118a83a4ba3f0ba5772936d421289","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        for tenant_id in context[\"tenants\"]:"},{"line_number":94,"context_line":"            self.assertEqual(0,"},{"line_number":95,"context_line":"                             len(context[\"tenants\"][tenant_id][\"containers\"]))"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @mock.patch(SWIFT_UTILS + \".osclients.Clients\")"},{"line_number":98,"context_line":"    def test_setup_failure_osclients_put_container(self, mock_osclients):"},{"line_number":99,"context_line":"        context \u003d {"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_772a0480","line":96,"in_reply_to":"3afb71cf_8d44771b","updated":"2015-06-09 02:10:25.000000000","message":"Done, I have added the checks but had to introduce two additional mock patches.  I don\u0027t know if there is any ways to workaround the additional variables.","commit_id":"86e0075b4506abc71650504012d23ecd3193d44a"}],"tests/unit/plugins/openstack/context/swift/test_utils.py":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"86c90b2e0083ee418941d0b311f3fe33d65b10c4","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                self.assertEqual(0, len(container[\"objects\"]))"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    @mock.patch(SWIFT_UTILS + \".osclients\")"},{"line_number":184,"context_line":"    def test_setup(self, mock_osclients):"},{"line_number":185,"context_line":"        orig_context \u003d {\"task\": {\"uuid\": \"id123\"}}"},{"line_number":186,"context_line":"        copy_context \u003d copy.deepcopy(orig_context)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_16b98f79","line":184,"updated":"2015-05-28 15:01:20.000000000","message":"If `setup\u0027 and `cleanup\u0027 removed from SwiftContext class (see my comment at utils.py), then correspondent tests can be removed as well","commit_id":"f86a5648a4792af2b44424bb6ceeaf297e13f8f3"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"01759afcd416ef4c735d5f511c75ebfd44539465","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                self.assertEqual(0, len(container[\"objects\"]))"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    @mock.patch(SWIFT_UTILS + \".osclients\")"},{"line_number":184,"context_line":"    def test_setup(self, mock_osclients):"},{"line_number":185,"context_line":"        orig_context \u003d {\"task\": {\"uuid\": \"id123\"}}"},{"line_number":186,"context_line":"        copy_context \u003d copy.deepcopy(orig_context)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_feb6b33c","line":184,"in_reply_to":"7a016987_16b98f79","updated":"2015-05-29 04:03:50.000000000","message":"Done","commit_id":"f86a5648a4792af2b44424bb6ceeaf297e13f8f3"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"15add3f8d86aeba0ef15c244477bbd1a7e8233d1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            ]"},{"line_number":40,"context_line":"        }"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        objects_ctx \u003d objects.SwiftObjectGenerator(context)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        containers \u003d objects_ctx._create_containers(containers_per_tenant, 15)"},{"line_number":45,"context_line":"        self.assertEqual(tenants * containers_per_tenant, len(containers))"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_580f5b2e","line":42,"updated":"2015-06-08 11:28:22.000000000","message":"This looks wrong to use instance of objects.SwiftObjectGenerator() in this test, because of:\n\n1) there may be a lot of possible classes based on SwiftObjectMixin, so why SwiftObjectGenerator?\n\n2) what if SwiftObjectGenerator overrides methods of SwiftObjectMixin? In this case we will not test SwiftObjectMixin at all.\n\n3) Unit testing requires having an instance of concrete unit (SwiftObjectMixin or at least a pure child class)\n\nI recommend something like this:\n\n class FooSwiftObjectMixin(SwiftObjectMixin):\n     def __init__(self):\n         self.context \u003d {...}\n\n\n class SwiftObjectMixinTestCase(test.TestCase):\n     def test__create_containers(self):\n         obj \u003d FooSwiftObjectMixin()\n         ...","commit_id":"86e0075b4506abc71650504012d23ecd3193d44a"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"1daeb4ca970118a83a4ba3f0ba5772936d421289","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            ]"},{"line_number":40,"context_line":"        }"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        objects_ctx \u003d objects.SwiftObjectGenerator(context)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        containers \u003d objects_ctx._create_containers(containers_per_tenant, 15)"},{"line_number":45,"context_line":"        self.assertEqual(tenants * containers_per_tenant, len(containers))"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_c21c60c3","line":42,"in_reply_to":"3afb71cf_580f5b2e","updated":"2015-06-09 02:10:25.000000000","message":"Done","commit_id":"86e0075b4506abc71650504012d23ecd3193d44a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"1e353eb072913b9a5c7bf1e00c2cd9b4d8adf962","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from rally.plugins.openstack.context.swift import utils"},{"line_number":19,"context_line":"from tests.unit import test"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"CTX_SWIFT \u003d \"rally.plugins.openstack.context.swift\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class FooSwiftObjectMixin(utils.SwiftObjectMixin):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_e3c98c5a","line":21,"updated":"2015-06-09 09:29:04.000000000","message":"UTILS \u003d \"rally.plugins.openstack.context.swift.utils\"","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"cfb26403683955fe592827613d7cad5fb7d2af82","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from rally.plugins.openstack.context.swift import utils"},{"line_number":19,"context_line":"from tests.unit import test"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"CTX_SWIFT \u003d \"rally.plugins.openstack.context.swift\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class FooSwiftObjectMixin(utils.SwiftObjectMixin):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_e964a6b9","line":21,"in_reply_to":"3afb71cf_e3c98c5a","updated":"2015-06-10 02:41:02.000000000","message":"Done","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"1e353eb072913b9a5c7bf1e00c2cd9b4d8adf962","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            ]"},{"line_number":46,"context_line":"        }"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        objects_ctx \u003d FooSwiftObjectMixin(context)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        containers \u003d objects_ctx._create_containers(containers_per_tenant, 15)"},{"line_number":51,"context_line":"        self.assertEqual(tenants * containers_per_tenant, len(containers))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_fdc6cb98","line":48,"updated":"2015-06-09 09:29:04.000000000","message":"I would recommend to rename `objects_ctx\u0027 to something like `swift_mixin\u0027 or even `mixin\u0027 since that is definitely not a context","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"cfb26403683955fe592827613d7cad5fb7d2af82","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            ]"},{"line_number":46,"context_line":"        }"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        objects_ctx \u003d FooSwiftObjectMixin(context)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        containers \u003d objects_ctx._create_containers(containers_per_tenant, 15)"},{"line_number":51,"context_line":"        self.assertEqual(tenants * containers_per_tenant, len(containers))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_6971d675","line":48,"in_reply_to":"3afb71cf_fdc6cb98","updated":"2015-06-10 02:41:02.000000000","message":"Done","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"1e353eb072913b9a5c7bf1e00c2cd9b4d8adf962","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            }"},{"line_number":95,"context_line":"        }"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        objects_ctx \u003d FooSwiftObjectMixin(context)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        objects_list \u003d objects_ctx._create_objects(objects_per_container,"},{"line_number":100,"context_line":"                                                   1024, 25)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_03dee8dc","line":97,"updated":"2015-06-09 09:29:04.000000000","message":"s/objects_ctx/mixin/","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"cfb26403683955fe592827613d7cad5fb7d2af82","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            }"},{"line_number":95,"context_line":"        }"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        objects_ctx \u003d FooSwiftObjectMixin(context)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        objects_list \u003d objects_ctx._create_objects(objects_per_container,"},{"line_number":100,"context_line":"                                                   1024, 25)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_e90b86d4","line":97,"in_reply_to":"3afb71cf_03dee8dc","updated":"2015-06-10 02:41:02.000000000","message":"Done","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"1e353eb072913b9a5c7bf1e00c2cd9b4d8adf962","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            }"},{"line_number":144,"context_line":"        }"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        objects_ctx \u003d FooSwiftObjectMixin(context)"},{"line_number":147,"context_line":"        objects_ctx._delete_containers(15)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        for tenant_id in context[\"tenants\"]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_43cf4029","line":146,"updated":"2015-06-09 09:29:04.000000000","message":"s/objects_ctx/mixin/","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"cfb26403683955fe592827613d7cad5fb7d2af82","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            }"},{"line_number":144,"context_line":"        }"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        objects_ctx \u003d FooSwiftObjectMixin(context)"},{"line_number":147,"context_line":"        objects_ctx._delete_containers(15)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        for tenant_id in context[\"tenants\"]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_a9110e06","line":146,"in_reply_to":"3afb71cf_43cf4029","updated":"2015-06-10 02:41:02.000000000","message":"Done","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"1e353eb072913b9a5c7bf1e00c2cd9b4d8adf962","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            self.assertEqual(0,"},{"line_number":151,"context_line":"                             len(context[\"tenants\"][tenant_id][\"containers\"]))"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    @mock.patch(CTX_SWIFT + \".utils.osclients\")"},{"line_number":154,"context_line":"    def test__delete_objects(self, mock_osclients):"},{"line_number":155,"context_line":"        context \u003d {"},{"line_number":156,"context_line":"            \"task\": {\"uuid\": \"id123\"},"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_83065884","line":153,"updated":"2015-06-09 09:29:04.000000000","message":"It is a bit more convenient to mock `osclients.Clients\u0027:\n\n    @mock.patch(UTILS + \".osclients.Clients\")\n    def test__delete_objects(self, mock_clients):","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"cfb26403683955fe592827613d7cad5fb7d2af82","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            self.assertEqual(0,"},{"line_number":151,"context_line":"                             len(context[\"tenants\"][tenant_id][\"containers\"]))"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    @mock.patch(CTX_SWIFT + \".utils.osclients\")"},{"line_number":154,"context_line":"    def test__delete_objects(self, mock_osclients):"},{"line_number":155,"context_line":"        context \u003d {"},{"line_number":156,"context_line":"            \"task\": {\"uuid\": \"id123\"},"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_e9c02652","line":153,"in_reply_to":"3afb71cf_83065884","updated":"2015-06-10 02:41:02.000000000","message":"Done","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"1e353eb072913b9a5c7bf1e00c2cd9b4d8adf962","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            }"},{"line_number":179,"context_line":"        }"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        objects_ctx \u003d FooSwiftObjectMixin(context)"},{"line_number":182,"context_line":"        objects_ctx._delete_objects(20)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        for tenant_id in context[\"tenants\"]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_e353cc69","line":181,"updated":"2015-06-09 09:29:04.000000000","message":"s/objects_ctx/mixin/","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"cfb26403683955fe592827613d7cad5fb7d2af82","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            }"},{"line_number":179,"context_line":"        }"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        objects_ctx \u003d FooSwiftObjectMixin(context)"},{"line_number":182,"context_line":"        objects_ctx._delete_objects(20)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        for tenant_id in context[\"tenants\"]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_89d09220","line":181,"in_reply_to":"3afb71cf_e353cc69","updated":"2015-06-10 02:41:02.000000000","message":"Done","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"1e353eb072913b9a5c7bf1e00c2cd9b4d8adf962","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"3afb71cf_831418a0","line":187,"updated":"2015-06-09 09:29:04.000000000","message":"Have to check if delete_object was actually called:\n\n        mock_swift \u003d mock_clients.return_value.swift.return_value\n        expected_objects \u003d [(\"c1\", \"o1\"), (\"c1\", \"o2\"), (\"c1\", \"o3\"),\n                            (\"c2\", \"o4\"), (\"c2\", \"o5\"), (\"c2\", \"o6\")]\n        mock_swift.delete_object.assert_has_calls(\n            [mock.call(c, o) for c, o in expected_objects], any_order\u003dTrue)","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"cfb26403683955fe592827613d7cad5fb7d2af82","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"3afb71cf_448eff79","line":187,"in_reply_to":"3afb71cf_831418a0","updated":"2015-06-10 02:41:02.000000000","message":"Done","commit_id":"a33f9bb25385e9e53cc71ff281baf4348dcebc1c"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"9c15b7f3bb19b4a87807a785f8e3f16c2df8899b","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        for tenant_id in context[\"tenants\"]:"},{"line_number":154,"context_line":"            self.assertEqual(0,"},{"line_number":155,"context_line":"                             len(context[\"tenants\"][tenant_id][\"containers\"]))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    @mock.patch(UTILS + \".osclients.Clients\")"},{"line_number":158,"context_line":"    def test__delete_objects(self, mock_clients):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_d510fb5b","line":155,"updated":"2015-06-11 19:42:18.000000000","message":"Moving L153-155 before L148, I can see the context gets updated correct so it\u0027s fair to assumed the broker\u0027s consume thread executed to completion.  But intermittently, especially on the jenkins job, the mock call list does not match the expected.","commit_id":"d572cbfbede0105303eae29e826dfbd27a2275e8"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"9c15b7f3bb19b4a87807a785f8e3f16c2df8899b","unresolved":false,"context_lines":[{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        for tenant_id in context[\"tenants\"]:"},{"line_number":196,"context_line":"            for container in context[\"tenants\"][tenant_id][\"containers\"]:"},{"line_number":197,"context_line":"                self.assertEqual(0, len(container[\"objects\"]))"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_30a99d7c","line":197,"updated":"2015-06-11 19:42:18.000000000","message":"Same here, moving L195-197 before L188 produced similar behavior as above.  Context check is ok but intermittently not mock call list check.","commit_id":"d572cbfbede0105303eae29e826dfbd27a2275e8"}]}
