Merge "Coho data sanity fix in the driver unittest"

This commit is contained in:
Jenkins 2016-06-03 17:25:25 +00:00 committed by Gerrit Code Review
commit b51e7aba7a

View File

@ -393,8 +393,8 @@ class CohoDriverTest(test.TestCase):
"Failed to establish.*"):
rpc_client.create_snapshot('src', 'dest', 0)
self.assertEqual(mock_make_call.call_count, coho.COHO_MAX_RETRIES)
self.assertEqual(mock_socket.call_count, coho.COHO_MAX_RETRIES + 1)
self.assertEqual(coho.COHO_MAX_RETRIES, mock_make_call.call_count)
self.assertEqual(coho.COHO_MAX_RETRIES + 1, mock_socket.call_count)
# assert that on a none EPIPE error it only tries once
socket_error.errno = errno.EINVAL
@ -403,5 +403,5 @@ class CohoDriverTest(test.TestCase):
"Unable to send request.*"):
rpc_client.delete_snapshot('src')
self.assertEqual(mock_make_call.call_count, coho.COHO_MAX_RETRIES + 1)
self.assertEqual(mock_socket.call_count, coho.COHO_MAX_RETRIES + 1)
self.assertEqual(coho.COHO_MAX_RETRIES + 1, mock_make_call.call_count)
self.assertEqual(coho.COHO_MAX_RETRIES + 1, mock_socket.call_count)