Skip to content

Commit 7af90b1

Browse files
authored
NO-SNOW: Fix flaky sql commit test (#2910)
1 parent 95824c3 commit 7af90b1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/integ/scala/test_session_suite.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,16 @@ def test_large_local_relation_no_commit(session):
277277
reason="transactions not supported by local testing.",
278278
run=False,
279279
)
280-
def test_create_temp_table_no_commit(session):
280+
@pytest.mark.skipif(
281+
IS_IN_STORED_PROC, reason="creating new session is not allowed in stored proc"
282+
)
283+
def test_create_temp_table_no_commit(
284+
db_parameters,
285+
sql_simplifier_enabled,
286+
):
287+
session = Session.builder.configs(db_parameters).create()
288+
session.sql_simplifier_enabled = sql_simplifier_enabled
289+
281290
# cache_result creates a temp table
282291
test_table = Utils.random_name_for_temp_object(TempObjectType.TABLE)
283292
try:
@@ -291,3 +300,4 @@ def test_create_temp_table_no_commit(session):
291300
assert not Utils.is_active_transaction(session)
292301
finally:
293302
Utils.drop_table(session, test_table)
303+
session.close()

0 commit comments

Comments
 (0)