Skip to content

Commit

Permalink
test: Ensure that database connection is torn down in copydb tests
Browse files Browse the repository at this point in the history
  • Loading branch information
p12tic committed Nov 4, 2024
1 parent d394b2e commit fa4b310
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions master/buildbot/test/unit/scripts/test_copydb.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ def resolve_db_url(self):

def drop_database_tables(self, db_url):
engine = enginestrategy.create_engine(db_url, basedir='basedir')
conn = engine.connect()
db.thd_clean_database(conn)
with engine.connect() as conn:
db.thd_clean_database(conn)

@async_to_deferred
async def test_full(self):
Expand Down

0 comments on commit fa4b310

Please sign in to comment.