55import pytest
66
77from clickhouse_connect import create_client
8- from clickhouse_connect import datatypes , common
8+ from clickhouse_connect import datatypes
99from clickhouse_connect .driver .client import Client
1010from clickhouse_connect .driver .exceptions import DatabaseError
1111from tests .integration_tests .conftest import TestConfig
@@ -215,12 +215,9 @@ def test_empty_result(test_client: Client):
215215 assert len (test_client .query ("SELECT * FROM system.tables WHERE name = '_NOT_A THING'" ).result_rows ) == 0
216216
217217
218- def test_temporary_tables (test_create_client : Callable ):
219- # Create a dedicated client for this test to ensure connection isolation
220- # which hopefully helps prevent problems in cloud env.
221- old_max_age = common .get_setting ('max_connection_age' )
222- common .set_setting ('max_connection_age' , 0 )
223- test_client = test_create_client ()
218+ def test_temporary_tables (test_client : Client , test_config : TestConfig ):
219+ if test_config .cloud :
220+ pytest .skip ("Skipping temporary tables test in cloud env" )
224221
225222 session_id = test_client .get_client_setting ("session_id" )
226223 session_settings = {"session_id" : session_id }
@@ -242,9 +239,6 @@ def test_temporary_tables(test_create_client: Callable):
242239 assert len (df ['field1' ]) == 4
243240 test_client .command ('DROP TABLE IF EXISTS temp_test_table' , settings = session_settings )
244241
245- test_client .close ()
246- common .set_setting ('max_connection_age' , old_max_age )
247-
248242
249243def test_str_as_bytes (test_client : Client , table_context : Callable ):
250244 with table_context ('test_insert_bytes' , ['key UInt32' , 'byte_str String' , 'n_byte_str Nullable(String)' ]):
0 commit comments