From 228dd59126dd9abd8608e0e2f0d2efc42448f9a9 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 10 Sep 2024 17:21:03 +0200 Subject: [PATCH] don't use threading with jdbc --- tests/test_really_old_jdbc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_really_old_jdbc.py b/tests/test_really_old_jdbc.py index 184dede..c97e8d0 100644 --- a/tests/test_really_old_jdbc.py +++ b/tests/test_really_old_jdbc.py @@ -1,5 +1,6 @@ import pytest import sqlalchemy +from sqlalchemy.pool import NullPool from databasez import Database @@ -23,7 +24,8 @@ async def test_jdbc_connect(): Test basic connection """ async with Database( - "jdbc+sqlite://testsuite.sqlite3?classpath=tests/sqlite-jdbc-3.6.13.jar&jdbc_driver=org.sqlite.JDBC" + "jdbc+sqlite://testsuite.sqlite3?classpath=tests/sqlite-jdbc-3.6.13.jar&jdbc_driver=org.sqlite.JDBC", + poolclass=NullPool, ) as database: async with database.connection(): pass @@ -36,7 +38,8 @@ async def test_jdbc_queries(): `fetch_one()`, `iterate()` and `batched_iterate()` interfaces are all supported (using SQLAlchemy core). """ async with Database( - "jdbc+sqlite://testsuite.sqlite3?classpath=tests/sqlite-jdbc-3.6.13.jar&jdbc_driver=org.sqlite.JDBC" + "jdbc+sqlite://testsuite.sqlite3?classpath=tests/sqlite-jdbc-3.6.13.jar&jdbc_driver=org.sqlite.JDBC", + poolclass=NullPool, ) as database: async with database.connection() as connection: await connection.create_all(metadata)