You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2024/09/05 08:41:57 UTC
[I] test_listener_logs_failed_serialization is flaky [airflow]
potiuk opened a new issue, #42020:
URL: https://github.com/apache/airflow/issues/42020
### Body
The test_listener_logs_failed_serialization is flaky - likely due to a race condition. This should be improve.
Example failure:
https://github.com/apache/airflow/actions/runs/10714765649/job/29709338209?pr=41331#step:7:5256
```
=================================== FAILURES ===================================
___________________ test_listener_logs_failed_serialization ____________________
self = <MagicMock name='mock.warning' id='139678763968448'>
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 'warning' to have been called once. Called 0 times.
/usr/local/lib/python3.8/unittest/mock.py:892: AssertionError
During handling of the above exception, another exception occurred:
def test_listener_logs_failed_serialization():
listener = OpenLineageListener()
listener.log = MagicMock()
listener.adapter = OpenLineageAdapter(
client=OpenLineageClient(transport=ConsoleTransport(config=ConsoleConfig()))
)
event_time = dt.datetime.now()
fut = listener.submit_callable(
listener.adapter.dag_failed,
dag_id="",
run_id="",
end_date=event_time,
execution_date=threading.Thread(),
dag_run_state=DagRunState.FAILED,
task_ids=["task_id"],
msg="",
)
assert fut.exception(10)
> listener.log.warning.assert_called_once()
E AssertionError: Expected 'warning' to have been called once. Called 0 times.
tests/providers/openlineage/plugins/test_listener.py:628: AssertionError
----------------------------- Captured stdout call -----------------------------
```
### 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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] test_listener_logs_failed_serialization is flaky [airflow]
Posted by "mobuchowski (via GitHub)" <gi...@apache.org>.
mobuchowski closed issue #42020: test_listener_logs_failed_serialization is flaky
URL: https://github.com/apache/airflow/issues/42020
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] test_listener_logs_failed_serialization is flaky [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #42020:
URL: https://github.com/apache/airflow/issues/42020#issuecomment-2333271325
🙇 @mobuchowski
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] test_listener_logs_failed_serialization is flaky [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #42020:
URL: https://github.com/apache/airflow/issues/42020#issuecomment-2330947743
cc: @mobuchowski @kacpermuda
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org