-
Notifications
You must be signed in to change notification settings - Fork 104
Closed
Description
def test_serialized_with_retry_socket_reset_reraised(self):
exc = socket.error()
exc.errno = errno.ECONNRESET
plugin = 'glance'
fn = 'download_vhd'
num_retries = 1
callback = None
retry_cb = mock.Mock()
with mock.patch.object(self.session, 'call_plugin_serialized',
autospec=True) as call_plugin_serialized:
call_plugin_serialized.side_effect = exc
self.assertRaises(exception.PluginRetriesExceeded,
self.session.call_plugin_serialized_with_retry, plugin, fn,
num_retries, callback, retry_cb)
call_plugin_serialized.assert_called_with(plugin, fn)
self.assertEqual(2, call_plugin_serialized.call_count)
No longer works.
The current work around is change 'autospec' to 'spec'. Not sure the root issue, lifeless sorted out the fix. This bug is here for tracking the resolution.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels