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 4277ca890df Fix collection error and timeout assertion in Snowpark 
container tests (#72709)
4277ca890df is described below

commit 4277ca890df478901d8b021a587ee0e473b27177
Author: Henry Chen <[email protected]>
AuthorDate: Tue Sep 8 21:15:33 2026 +0800

    Fix collection error and timeout assertion in Snowpark container tests 
(#72709)
    
    The deferrable-mode change reached for itertools.count without importing
    itertools, so the whole test module fails to collect and every check that
    scans all files goes red. Its timeout test also advanced the clock past the
    deadline before the first poll, so the operator logged no status at all and
    the assertion on the last observed status could never hold.
---
 .../tests/unit/snowflake/operators/test_snowpark_containers.py        | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/providers/snowflake/tests/unit/snowflake/operators/test_snowpark_containers.py
 
b/providers/snowflake/tests/unit/snowflake/operators/test_snowpark_containers.py
index 12262c22901..b98719020cf 100644
--- 
a/providers/snowflake/tests/unit/snowflake/operators/test_snowpark_containers.py
+++ 
b/providers/snowflake/tests/unit/snowflake/operators/test_snowpark_containers.py
@@ -16,6 +16,7 @@
 # under the License.
 from __future__ import annotations
 
+import itertools
 from datetime import datetime, timedelta, timezone
 from unittest import mock
 
@@ -173,7 +174,8 @@ class TestSnowparkContainerJobOperator:
         [(True, True), (False, False)],
     )
     @mock.patch("time.sleep")
-    @mock.patch("time.monotonic", side_effect=itertools.count(0, 20))
+    # 0 sets the deadline at 10, 5 admits one poll that observes RUNNING, 10 
then trips the timeout.
+    @mock.patch("time.monotonic", side_effect=itertools.count(0, 5))
     @mock.patch(MOCK_HOOK_PATH)
     @mock.patch.object(SnowparkContainerJobOperator, "_log_container_output")
     def test_poll_raises_and_logs_on_timeout(

Reply via email to