Skip to content

Commit

Permalink
don't use threading with jdbc
Browse files Browse the repository at this point in the history
  • Loading branch information
devkral committed Sep 10, 2024
1 parent 9b8c408 commit 228dd59
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_really_old_jdbc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
import sqlalchemy
from sqlalchemy.pool import NullPool

from databasez import Database

Expand All @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 228dd59

Please sign in to comment.