Skip to content

Commit 2ee6a91

Browse files
authored
test(pyspark): avoid disconnecting with pyspark as it breaks subsequent tests (#10995)
1 parent 93d3b24 commit 2ee6a91

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ibis/backends/tests/test_client.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ def test_create_temporary_table_from_schema(con_no_data, new_schema):
362362
== column_type
363363
)
364364

365-
con_no_data.disconnect()
365+
if con_no_data.name != "pyspark":
366+
con_no_data.disconnect()
366367
con_no_data.reconnect()
367368
# verify table no longer exist after reconnect
368369
assert temp_table not in con_no_data.list_tables()
@@ -822,7 +823,8 @@ def test_connect_url(url):
822823
try:
823824
assert con.execute(ibis.literal(1)) == 1
824825
finally:
825-
con.disconnect()
826+
if con.name != "pyspark":
827+
con.disconnect()
826828

827829

828830
@pytest.mark.parametrize(
@@ -1256,7 +1258,7 @@ def test_set_backend(con, monkeypatch):
12561258
"name",
12571259
[
12581260
param(name, marks=getattr(mark, name), id=name)
1259-
for name in ("datafusion", "duckdb", "polars", "sqlite")
1261+
for name in ("datafusion", "duckdb", "polars", "sqlite", "pyspark")
12601262
],
12611263
)
12621264
def test_set_backend_name(name, monkeypatch):
@@ -1268,7 +1270,8 @@ def test_set_backend_name(name, monkeypatch):
12681270
con = ibis.get_backend()
12691271
assert con.name == name
12701272
finally:
1271-
con.disconnect()
1273+
if con.name != "pyspark":
1274+
con.disconnect()
12721275

12731276

12741277
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)