)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2993090e6bca91ae2f8ef3127bad61811a21902f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The runtime of some tests like"},{"line_number":10,"context_line":" StorwizeSVCCommonDriverTestCase.test_run_ssh_both_ip_set_failure,"},{"line_number":11,"context_line":" StorwizeSVCCommonDriverTestCase.test_run_secondary_ip_ssh_fail_to_san_ip"},{"line_number":12,"context_line":"are about 4-6s. This patch reduces the runtime of that tests."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I1dc1fe6fce10fdda149d864a370751c730cafd27"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1ac06dbe_aaef7e1c","line":12,"range":{"start_line":12,"start_character":50,"end_line":12,"end_character":54},"updated":"2016-08-23 11:37:17.000000000","message":"nit: those","commit_id":"b3f066f70364c916a9e105488fba35c3f45dc928"}],"cinder/tests/unit/volume/drivers/ibm/test_storwize_svc.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2993090e6bca91ae2f8ef3127bad61811a21902f","unresolved":false,"context_lines":[{"line_number":4261,"context_line":"                         \u0027Storwize driver add vdisk copy error.\u0027)"},{"line_number":4262,"context_line":"        self.driver._check_volume_copy_ops()"},{"line_number":4263,"context_line":"        self.driver._rm_vdisk_copy_op(ctxt, volume, new_ops[0], new_ops[1])"},{"line_number":4264,"context_line":"        with mock.patch.object(self.db,"},{"line_number":4265,"context_line":"                               \u0027volume_admin_metadata_get\u0027) as mock_get:"},{"line_number":4266,"context_line":"            mock_get.return_value \u003d {}"},{"line_number":4267,"context_line":"            admin_metadata \u003d self.db.volume_admin_metadata_get(ctxt,"},{"line_number":4268,"context_line":"                                                               volume[\u0027id\u0027])"},{"line_number":4269,"context_line":"            self.assertIsNone(admin_metadata.get(\u0027vdiskcopyops\u0027, None),"},{"line_number":4270,"context_line":"                              \u0027Storwize driver delete vdisk copy error\u0027)"},{"line_number":4271,"context_line":"            mock_get.assert_called_once_with(ctxt, volume[\u0027id\u0027])"},{"line_number":4272,"context_line":"        self._delete_volume(volume)"},{"line_number":4273,"context_line":""},{"line_number":4274,"context_line":"    def test_storwize_delete_with_vdisk_copy_ops(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ac06dbe_6a710644","line":4271,"range":{"start_line":4264,"start_character":0,"end_line":4271,"end_character":64},"updated":"2016-08-23 11:37:17.000000000","message":"-1: I believe this defeats the whole purpose of the check in original L4263, since the test is to confirm that there\u0027s no vdiskcopoyops in the DB, and you are just faking the result we want to get.","commit_id":"b3f066f70364c916a9e105488fba35c3f45dc928"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"fbb3211695c3230526bf33ae13b9f174b6dfd07a","unresolved":false,"context_lines":[{"line_number":3055,"context_line":"            min_size\u003dself._driver.configuration.ssh_min_pool_conn,"},{"line_number":3056,"context_line":"            max_size\u003dself._driver.configuration.ssh_max_pool_conn)"},{"line_number":3057,"context_line":""},{"line_number":3058,"context_line":"    @mock.patch.object(greenthread, \u0027sleep\u0027)"},{"line_number":3059,"context_line":"    @mock.patch.object(ssh_utils, \u0027SSHPool\u0027)"},{"line_number":3060,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027)"},{"line_number":3061,"context_line":"    def test_run_secondary_ip_ssh_fail_to_san_ip(self, mock_ssh_execute,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_1410cba7","line":3058,"updated":"2016-08-27 17:52:14.000000000","message":"We ran into quite a few hang unit tests with mock sleep in them. I don\u0027t know why it happened, but would prefer not to add more mock sleep.  Is there a way to change the wait time to 0 instead?  See this patch:\n\nhttps://review.openstack.org/#/c/360807/","commit_id":"f8f81ab954d5a38c86dd4bc40dca5ae8a640aa36"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5b2dbca84d025fde0d08b1d811923e9a41858d7b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"from cinder.volume import utils as volume_utils"},{"line_number":52,"context_line":"from cinder.volume import volume_types"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"storwize_svc_common.DEFAULT_GR_SLEEP \u003d 0"},{"line_number":55,"context_line":"SVC_POOLS \u003d [\u0027openstack\u0027, \u0027openstack1\u0027]"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_43b8a9c8","line":54,"range":{"start_line":54,"start_character":0,"end_line":54,"end_character":40},"updated":"2016-08-29 13:44:13.000000000","message":"Won\u0027t this set it globally? Can we just mock it instead? Something like that should work:\n\n @mock.patch.object(storwize_svc_common, \"DEFAULT_GR_SLEEP\", 0)\n\nThis should replace DEFAULT_GR_SLEEP with 0, but only temporarily.","commit_id":"7b92ad5ba5849f80bc9e001a7da07b716a196780"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"3885b0a243ac2c4710b42f82aa63b58b4f03b73b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"from cinder.volume import utils as volume_utils"},{"line_number":52,"context_line":"from cinder.volume import volume_types"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"storwize_svc_common.DEFAULT_GR_SLEEP \u003d 0"},{"line_number":55,"context_line":"SVC_POOLS \u003d [\u0027openstack\u0027, \u0027openstack1\u0027]"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_c34119ab","line":54,"range":{"start_line":54,"start_character":0,"end_line":54,"end_character":40},"in_reply_to":"fa7ab95a_43b8a9c8","updated":"2016-08-29 13:45:52.000000000","message":"Yes, it should be done with mock and from within the setUp() method rather than here.","commit_id":"7b92ad5ba5849f80bc9e001a7da07b716a196780"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"3885b0a243ac2c4710b42f82aa63b58b4f03b73b","unresolved":false,"context_lines":[{"line_number":2869,"context_line":""},{"line_number":2870,"context_line":"@ddt.ddt"},{"line_number":2871,"context_line":"class StorwizeSVCCommonDriverTestCase(test.TestCase):"},{"line_number":2872,"context_line":"    @mock.patch.object(time, \u0027sleep\u0027)"},{"line_number":2873,"context_line":"    def setUp(self, mock_sleep):"},{"line_number":2874,"context_line":"        super(StorwizeSVCCommonDriverTestCase, self).setUp()"},{"line_number":2875,"context_line":"        self.USESIM \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_e3d0ddf8","line":2872,"updated":"2016-08-29 13:45:52.000000000","message":"These tests already mock sleep (here and in other classes), so I\u0027m not sure what the worry is about doing that.","commit_id":"7b92ad5ba5849f80bc9e001a7da07b716a196780"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"86fd132105a3e42c707c8ee14dacf04f56f7649b","unresolved":false,"context_lines":[{"line_number":2869,"context_line":""},{"line_number":2870,"context_line":"@ddt.ddt"},{"line_number":2871,"context_line":"class StorwizeSVCCommonDriverTestCase(test.TestCase):"},{"line_number":2872,"context_line":"    @mock.patch.object(time, \u0027sleep\u0027)"},{"line_number":2873,"context_line":"    def setUp(self, mock_sleep):"},{"line_number":2874,"context_line":"        super(StorwizeSVCCommonDriverTestCase, self).setUp()"},{"line_number":2875,"context_line":"        self.USESIM \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_468c347f","line":2872,"in_reply_to":"fa7ab95a_e3d0ddf8","updated":"2016-08-29 14:31:46.000000000","message":"Mocking it here will only mock it during the setup.\n\nI think the worry is double, on one hand we have that if you mock the sleep method in the setUp, then test_storwize_vdisk_copy_ops fails in a weird way and it\u0027s not easy to locate the reason of the failure.\n\nThe second reason is that apparently there are cases where mocking time.sleep creates problems, as Xing points out.","commit_id":"7b92ad5ba5849f80bc9e001a7da07b716a196780"}],"cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b9ba6cd547fa14f3194421ffadbf3a623e066d7b","unresolved":false,"context_lines":[{"line_number":120,"context_line":"CONF \u003d cfg.CONF"},{"line_number":121,"context_line":"CONF.register_opts(storwize_svc_opts)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"DEFAULT_GR_SLEEP \u003d random.randint(20, 500) / 100.0"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class StorwizeSSH(object):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_a6fc2073","line":123,"updated":"2016-08-29 14:36:24.000000000","message":"-1: This should be defined as a class attribute in StorwizeSVCCommonDriver, it has no use outside of that class.  Maybe dulek and eharney disagree and they think it\u0027s fine to be defined here.","commit_id":"cba877d694ef3f377bc00296e2f3188389cdb4ca"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"34aefc27b3734cb0599187039df2fcdacddc89e8","unresolved":false,"context_lines":[{"line_number":1209,"context_line":"                          \u0027attr\u0027: mapping_attrs})"},{"line_number":1210,"context_line":"                LOG.error(msg)"},{"line_number":1211,"context_line":"                raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":1212,"context_line":"            greenthread.sleep(wait_time)"},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"        if not mapping_ready:"},{"line_number":1215,"context_line":"            msg \u003d (_(\u0027Mapping %(id)s prepare failed to complete within the\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_8933afaa","line":1212,"updated":"2016-08-29 14:44:29.000000000","message":"I think we should set the wait_time to 0 during tests.","commit_id":"cba877d694ef3f377bc00296e2f3188389cdb4ca"}]}
