changed severity of cc failures
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Pünkösd Marcell 2020-05-13 17:20:58 +02:00
parent 06279d1346
commit 879b241060
2 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ class ConsumerCommunicator:
response = self._session.post(f"http://{ip}/sync", json={'uuid': os.environ['LOCAL_UUID']}, timeout=5)
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
logging.error(f"Error while syncing to {ip}: {str(e)}")
logging.warning(f"Error while syncing to {ip}: {str(e)}")
return
if response.status_code == 200:
@ -53,7 +53,7 @@ class ConsumerCommunicator:
response = self._session.post(f"http://{ip}/sync", json={'uuid': os.environ['LOCAL_UUID']}, timeout=5)
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
logging.error(f"Error while syncing to {ip}: {str(e)}")
logging.warning(f"Error while syncing to {ip}: {str(e)}")
continue
if response.status_code == 200:

View File

@ -347,13 +347,13 @@ def test_cc_targeted_sync(requests_mock, consumer_communicator_instance):
def test_cc_targeted_sync_error_logged(mocker, requests_mock, consumer_communicator_instance):
mocker.patch("logging.error")
mocker.patch("logging.warning")
requests_mock.post("http://127.0.0.2/sync", exc=requests.exceptions.ConnectTimeout)
consumer_communicator_instance.targeted_snyc("127.0.0.2")
logging.error.assert_called_once()
logging.warning.assert_called_once()
def test_cc_sync_all(requests_mock, consumer_communicator_instance):
@ -399,7 +399,7 @@ def test_cc_sync_all(requests_mock, consumer_communicator_instance):
def test_cc_sync_all_error_logged(mocker, requests_mock, consumer_communicator_instance):
mocker.patch("logging.error")
mocker.patch("logging.warning")
consumer_communicator_instance._redis_store.r.keys.side_effect = lambda a: [
b"consumer_uuid1",
@ -441,7 +441,7 @@ def test_cc_sync_all_error_logged(mocker, requests_mock, consumer_communicator_i
assert first.last_request.json()['uuid'] == LOCAL_UUID
logging.error.assert_called_once()
logging.warning.assert_called_once()
# ========================================