From a9a2eef5548dc809f45a6f1caff905c18b4d19b1 Mon Sep 17 00:00:00 2001 From: Andong Zhan Date: Tue, 22 Oct 2024 16:16:03 -0700 Subject: [PATCH] SNOW-1758877 Fix flaky test test_snowflake_cortex_summarize (#2492) 1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR. Fixes SNOW-1758877 2. Fill out the following pre-review checklist: - [ ] I am adding a new automated test(s) to verify correctness of my new code - [ ] If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing - [ ] I am adding new logging messages - [ ] I am adding a new telemetry message - [ ] I am adding new credentials - [ ] I am adding a new dependency - [ ] If this is a new feature/behavior, I'm adding the Local Testing parity changes. - [ ] I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: [Thread-safe Developer Guidelines](https://docs.google.com/document/d/162d_i4zZ2AfcGRXojj0jByt8EUq-DrSHPPnTa4QvwbA/edit#bookmark=id.e82u4nekq80k) 3. Please describe how your code solves the related issue. Please write a short description of how your code change solves the related issue. --- tests/integ/modin/test_apply_snowpark_python_functions.py | 1 + tests/integ/test_function.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integ/modin/test_apply_snowpark_python_functions.py b/tests/integ/modin/test_apply_snowpark_python_functions.py index a1f8cd1017a..20af23c9c20 100644 --- a/tests/integ/modin/test_apply_snowpark_python_functions.py +++ b/tests/integ/modin/test_apply_snowpark_python_functions.py @@ -78,6 +78,7 @@ def test_apply_snowpark_python_function_not_implemented(): @sql_count_checker(query_count=1) +@pytest.mark.skip("SNOW-1758914 snowflake.cortex.summarize error on GCP") def test_apply_snowflake_cortex_summarize(): from snowflake.snowpark.functions import snowflake_cortex_summarize diff --git a/tests/integ/test_function.py b/tests/integ/test_function.py index 51a9071cb88..3706e45f447 100644 --- a/tests/integ/test_function.py +++ b/tests/integ/test_function.py @@ -2265,6 +2265,7 @@ def test_ln(session): "config.getoption('local_testing_mode', default=False)", reason="FEAT: snowflake_cortex functions not supported", ) +@pytest.mark.skip("SNOW-1758914 snowflake.cortex.summarize error on GCP") def test_snowflake_cortex_summarize(session): content = """In Snowpark, the main way in which you query and process data is through a DataFrame. This topic explains how to work with DataFrames. @@ -2291,6 +2292,6 @@ def test_snowflake_cortex_summarize(session): 0 ][0] summary_from_str = df.select(snowflake_cortex_summarize(content)).collect()[0][0] - assert summary_from_col == summary_from_str # this length check is to get around the fact that this function may not be deterministic + assert 0 < len(summary_from_col) < len(content) assert 0 < len(summary_from_str) < len(content)