SameerMesiah97 commented on code in PR #67626:
URL: https://github.com/apache/airflow/pull/67626#discussion_r3330460292
##########
providers/dbt/cloud/tests/unit/dbt/cloud/triggers/test_dbt.py:
##########
@@ -87,6 +88,37 @@ async def test_dbt_run_job_trigger(self,
mock_get_job_status, end_time):
assert task.done() is False
asyncio.get_event_loop().stop()
+ @pytest.mark.asyncio
+ @mock.patch("airflow.providers.dbt.cloud.triggers.dbt.time")
+
@mock.patch("airflow.providers.dbt.cloud.hooks.dbt.DbtCloudHook.get_job_status")
+ async def test_dbt_run_job_trigger_uses_wall_clock_end_time(
+ self, mock_get_job_status, mock_time, end_time
+ ):
+ """Assert serialized end_time is compared to wall-clock time, not
monotonic time."""
+
+ mock_time.time.return_value = end_time - 60
+ mock_time.monotonic.return_value = end_time + 60
Review Comment:
Is this needed? Are we not asserting that monotonic is not called so the
value is not relevant?
--
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]