Skip to content

Commit

Permalink
🪲 Fix specific asynpg oriented test
Browse files Browse the repository at this point in the history
* The connections were hanging sometimes
during the tests.
  • Loading branch information
tarsil committed Mar 22, 2023
1 parent 6e98885 commit 4cc05b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,15 @@ def insert_independently():

query = notes.insert().values(text="example1", completed=True)
conn.execute(query)
conn.close()

def delete_independently():
engine = sqlalchemy.create_engine(str(database_url))
conn = engine.connect()

query = notes.delete()
conn.execute(query)
conn.close()

async with Database(database_url) as database:
async with database.transaction(force_rollback=True, isolation="serializable"):
Expand Down

0 comments on commit 4cc05b9

Please sign in to comment.