You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2025/07/25 08:39:29 UTC
(airflow) branch main updated: Making another brittle test related to log assertion more robust (#53747)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new e9ed4e17ec7 Making another brittle test related to log assertion more robust (#53747)
e9ed4e17ec7 is described below
commit e9ed4e17ec7b0d15a70e3ab9e4ba99c78cc39fcd
Author: Amogh Desai <am...@gmail.com>
AuthorDate: Fri Jul 25 14:09:22 2025 +0530
Making another brittle test related to log assertion more robust (#53747)
---
.../flink/tests/unit/apache/flink/sensors/test_flink_kubernetes.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/providers/apache/flink/tests/unit/apache/flink/sensors/test_flink_kubernetes.py b/providers/apache/flink/tests/unit/apache/flink/sensors/test_flink_kubernetes.py
index 0ac117caa32..0df129be503 100644
--- a/providers/apache/flink/tests/unit/apache/flink/sensors/test_flink_kubernetes.py
+++ b/providers/apache/flink/tests/unit/apache/flink/sensors/test_flink_kubernetes.py
@@ -20,7 +20,7 @@
from __future__ import annotations
import json
-from unittest.mock import patch
+from unittest.mock import call, patch
import pytest
from kubernetes.client import V1ObjectMeta, V1Pod, V1PodList
@@ -1130,10 +1130,7 @@ class TestFlinkKubernetesSensor:
namespace="default", watch=False, label_selector="component=taskmanager,app=flink-stream-example"
)
mock_pod_logs.assert_called_once_with("basic-example-taskmanager-1-1", namespace="default")
- log_info_call = info_log_call.mock_calls[4]
- log_value = log_info_call[1][0]
-
- assert log_value == TEST_POD_LOG_RESULT
+ assert call(TEST_POD_LOG_RESULT) in info_log_call.mock_calls
mock_namespaced_crd.assert_called_once_with(
group="flink.apache.org",