potiuk opened a new issue, #33382: URL: https://github.com/apache/airflow/issues/33382
### Body Seems that it has been starting happening affter https://github.com/apache/airflow/pull/31703 Worth looking at @pankajastro https://github.com/apache/airflow/actions/runs/5852654575/job/15865548629?pr=33364 ``` __________ TestDatabricksExecutionTrigger.test_sleep_between_retries ___________ self = <tests.providers.databricks.triggers.test_databricks.TestDatabricksExecutionTrigger object at 0x7f0c0e7baf50> mock_get_run_state = <AsyncMock name='a_get_run_state' id='139689198176240'> mock_sleep = <AsyncMock name='sleep' id='139689212547792'> @pytest.mark.asyncio @mock.patch("airflow.providers.databricks.triggers.databricks.asyncio.sleep") @mock.patch("airflow.providers.databricks.hooks.databricks.DatabricksHook.a_get_run_state") async def test_sleep_between_retries(self, mock_get_run_state, mock_sleep): mock_get_run_state.side_effect = [ RunState( life_cycle_state=LIFE_CYCLE_STATE_PENDING, state_message="", result_state="", ), RunState( life_cycle_state=LIFE_CYCLE_STATE_TERMINATED, state_message="", result_state="SUCCESS", ), ] generator = self.trigger.run() actual = await generator.asend(None) assert actual == TriggerEvent( { "run_id": RUN_ID, "run_state": RunState( life_cycle_state=LIFE_CYCLE_STATE_TERMINATED, state_message="", result_state="SUCCESS" ).to_json(), "run_page_url": RUN_PAGE_URL, } ) > mock_sleep.assert_called_once() tests/providers/databricks/triggers/test_databricks.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AsyncMock name='sleep' id='139689212547792'> def assert_called_once(self): """assert that the mock was called only once. """ if not self.call_count == 1: msg = ("Expected '%s' to have been called once. Called %s times.%s" % (self._mock_name or 'mock', self.call_count, self._calls_repr())) > raise AssertionError(msg) E AssertionError: Expected 'sleep' to have been called once. Called 12 times. E Calls: [call(30), E call(3.483486096191374), E call(0.813519164[8180](https://github.com/apache/airflow/actions/runs/5852654575/job/15865548629?pr=33364#step:6:8198)202), E call(4.252464545552433), E call(2.407743554553495), E call(2.426392669267501), E call(1.7065142153808315), E call(2.0452043229765677), E call(2.3704474685726793), E call(3.9805234337374165), E call(4.5757845484608195), E call(3.865035447312122)]. /usr/local/lib/python3.10/unittest/mock.py:908: AssertionError ``` ### Committer - [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
