Skip to content

Commit 00010fe

Browse files
authored
NO-SNOW: Add LIMIT clause to SHOW object tests (#4023)
1 parent ba474b8 commit 00010fe

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

tests/integ/scala/test_result_attributes_suite.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ def test_array_type(session):
154154
)
155155
def test_describe_schema_matches_execute_schema_for_show_queries(session, obj):
156156
query = f"show {obj}"
157+
if obj == "databases":
158+
query += " limit 10000"
157159
# describe query
158160
show_query_schema_describe = session._get_result_attributes(query)
159161
assert len(show_query_schema_describe) > 0

tests/integ/scala/test_result_schema_suite.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ def test_show_database_objects(
8989

9090
@pytest.mark.skipif(IS_IN_STORED_PROC_LOCALFS, reason="Large result")
9191
def test_show_account_objects(session):
92-
sqls = ["show functions", "show network policies", "show roles", "show databases"]
92+
sqls = [
93+
"show functions limit 10000",
94+
"show network policies limit 10000",
95+
"show roles limit 10000",
96+
"show databases limit 10000",
97+
]
9398
for sql in sqls:
9499
Utils.verify_schema(sql, session.sql(sql).schema, session)
95100

@@ -101,13 +106,13 @@ def test_show_session_operations(session):
101106

102107
def test_show_terse(session):
103108
sqls = [
104-
"show terse databases",
105-
"show terse schemas",
106-
"show terse tables",
107-
"show terse views",
108-
"show terse streams",
109-
"show terse tasks",
110-
"show terse external tables",
109+
"show terse databases limit 10000",
110+
"show terse schemas limit 10000",
111+
"show terse tables limit 10000",
112+
"show terse views limit 10000",
113+
"show terse streams limit 10000",
114+
"show terse tasks limit 10000",
115+
"show terse external tables limit 10000",
111116
]
112117
for sql in sqls:
113118
Utils.verify_schema(sql, session.sql(sql).schema, session)

0 commit comments

Comments
 (0)