'Make the configured number of attempts when mounts fail.'

@mock.patch('time.sleep')
def test_ensure_share_mounted_exception(self, _mock_sleep):

    num_attempts = 3
    self._set_driver()
    self.mock_object(self._driver._remotefsclient, 'mount', side_effect=Exception)
    drv = self._driver
    drv.configuration.nfs_mount_attempts = num_attempts
    drv.shares = {self.TEST_NFS_EXPORT1: ''}
    self.assertRaises(exception.NfsException, drv._ensure_share_mounted, self.TEST_NFS_EXPORT1)
    self.assertEqual(num_attempts, drv._remotefsclient.mount.call_count)
