mik-laj commented on issue #5950: [AIRFLOW-5341] Use more precise mock of time.sleep URL: https://github.com/apache/airflow/pull/5950#issuecomment-526356120 It is worth adding that current mocking causes flaky tests. ``` [2019-08-27 14:53:39,532] {__init__.py:52} INFO - Using executor SequentialExecutor [2019-08-27 14:53:39,605] {dagbag.py:86} INFO - Filling up the DagBag from /opt/airflow/tests/dags/test_default_impersonation.py -- Traceback (most recent call last): /usr/local/lib/python3.5/unittest/mock.py line 1159 in patched return func(*args, **keywargs) tests/gcp/hooks/test_cloud_storage_transfer_service.py line 249 in test_wait_for_transfer_job mock_sleep.assert_called_once_with(TIME_TO_SLEEP_IN_SECONDS) /usr/local/lib/python3.5/unittest/mock.py line 804 in assert_called_once_with raise AssertionError(msg) AssertionError: Expected 'sleep' to be called once. Called 330 times. ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
