From 2330e71174931b54154f29049354c4b2fbee7d2f Mon Sep 17 00:00:00 2001 From: azhan Date: Tue, 22 Oct 2024 14:53:52 -0700 Subject: [PATCH 1/2] SNOW-1758877 Fix flaky test test_snowflake_cortex_summarize --- tests/integ/test_function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integ/test_function.py b/tests/integ/test_function.py index 51a9071cb8..6cd69db13d 100644 --- a/tests/integ/test_function.py +++ b/tests/integ/test_function.py @@ -2291,6 +2291,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) From f2730d3703225b4fcd99cb9d46202b898c5cf55a Mon Sep 17 00:00:00 2001 From: azhan Date: Tue, 22 Oct 2024 15:25:47 -0700 Subject: [PATCH 2/2] xfail --- tests/integ/modin/test_apply_snowpark_python_functions.py | 1 + tests/integ/test_function.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/integ/modin/test_apply_snowpark_python_functions.py b/tests/integ/modin/test_apply_snowpark_python_functions.py index a1f8cd1017..20af23c9c2 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 6cd69db13d..3706e45f44 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.