potiuk commented on issue #33382:
URL: https://github.com/apache/airflow/issues/33382#issuecomment-1821832497

   Unfortunately we ssme that one re-appeared - it's very rare, but it happened 
again :) 
   
   * https://github.com/apache/airflow/actions/runs/6949888205/job/18909492387
   
   ```
   =================================== FAILURES 
===================================
   __________ TestDatabricksExecutionTrigger.test_sleep_between_retries 
___________
   
   self = 
<tests.providers.databricks.triggers.test_databricks.TestDatabricksExecutionTrigger
 object at 0x7f67de189d50>
   mock_get_run_state = <AsyncMock name='a_get_run_state' id='140084676774880'>
   mock_sleep = <AsyncMock name='sleep' id='140084674550736'>
   
       @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",
               ),
           ]
       
           trigger_event = self.trigger.run()
           async for event in trigger_event:
               assert event == 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:153: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
   
   self = <AsyncMock name='sleep' id='140084674550736'>
   
       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 39 times.
   E           Calls: [call(30),
   E            call(1.5614954891818282),
   E            call(4.947393322584771),
   E            call(1.098632801403257),
   E            call(4.245258848656453),
   E            call(4.069514337592413),
   E            call(0.6677589362499334),
   E            call(1.3359160588431975),
   E            call(0.07929569295131796),
   E            call(5.404071101042226),
   E            call(5.743428527804218),
   E            call(2.7449642348197374),
   E            call(11.53270264980902),
   E            call(0.4576054206335382),
   E            call(10.185369522033069),
   E            call(0.3881695575480826),
   E            call(14.601938371047803),
   E            call(3.464100900781081),
   E            call(13.651888163702226),
   E            call(11.518445750880675),
   E            call(11.805540294945818),
   E            call(1.6654214641285763),
   E            call(12.116858954152775),
   E            call(0.4274309662069142),
   E            call(2.1419843921887987),
   E            call(15.108680099488625),
   E            call(14.200441665349484),
   E            call(17.461868373600186),
   E            call(9.176234144014751),
   E            call(7.823477464693354),
   E            call(9.709087497895718),
   E            call(12.996552399230477),
   E            call(17.364527077318467),
   E            call(12.750015645644263),
   E            call(9.405866521202778),
   E            call(5.319519737900769),
   E            call(2.652528572765807),
   E            call(6.5879276596641585),
   E            call(1.2949168686974422)].
   
   /usr/local/lib/python3.10/unittest/mock.py:908: AssertionError
   ----------------------------- Captured stderr call 
-----------------------------
   INFO  
[airflow.providers.databricks.triggers.databricks.DatabricksExecutionTrigger] 
run-id 1 in run state {'life_cycle_state': 'PENDING', 'result_state': '', 
'state_message': ''}. sleeping for 30 seconds
   ------------------------------ Captured log call 
-------------------------------
   INFO     
airflow.providers.databricks.triggers.databricks.DatabricksExecutionTrigger:databricks.py:94
 run-id 1 in run state {'life_cycle_state': 'PENDING', 'result_state': '', 
'state_message': ''}. sleeping for 30 seconds
   - generated xml file: 
/files/test_result-providers_-amazon_google-postgres.xml -
   
   ```


-- 
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]

Reply via email to