moiseenkov commented on code in PR #33440:
URL: https://github.com/apache/airflow/pull/33440#discussion_r1298079515
##########
tests/providers/google/cloud/sensors/test_dataplex.py:
##########
@@ -144,3 +145,47 @@ def test_done(self, mock_hook):
)
assert result
+
+ def test_start_sensor_time(self):
+ sensor = DataplexDataQualityJobStatusSensor(
+ task_id=TASK_ID,
+ project_id=PROJECT_ID,
+ job_id=TEST_JOB_ID,
+ data_scan_id=TEST_DATA_SCAN_ID,
+ region=REGION,
+ api_version=API_VERSION,
+ gcp_conn_id=GCP_CONN_ID,
+ impersonation_chain=IMPERSONATION_CHAIN,
+ timeout=TIMEOUT,
+ )
+
+ assert sensor.start_sensor_time is None
+
+ duration_1 = sensor._duration()
+ duration_2 = sensor._duration()
+
+ assert bool(sensor.start_sensor_time)
+ assert duration_1 > 0
+ assert duration_2 > 0
Review Comment:
I updated the condition just to cover more cases:
```python
assert 0 < duration_1 < duration_2
```
--
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]