Page MenuHomeSoftware Heritage

test_storage: Use the db_transaction context manager instead of raw connections
ClosedPublic

Authored by olasd on Wed, Oct 2, 5:25 PM.

Details

Summary

This minimizes the risk of dangling db connections, which in turn reduces the
chance of cascading test failures.

Depends on D2067

Test Plan

tox runs without issue

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd created this revision.Wed, Oct 2, 5:25 PM
anlambert accepted this revision.Wed, Oct 2, 5:57 PM
anlambert added a subscriber: anlambert.

Looks clearer indeed.

This revision is now accepted and ready to land.Wed, Oct 2, 5:57 PM