This bug was introduced in ef7f9e27; while moving timeout for execute
to the cursor wrapper, commit was moved as well; however commit is
purely a connection method, only execute is passed on to a cursor.
Added unit tests to check both methods for correct timeouts.
This manifested in a test failure as:
ERROR __call__ error with POST /sdb1/418/AUTH_d1c4b610b16a48de83219c696261009c/TestContainer-tempest-1572414684 :
Traceback (most recent call last):
File "/opt/stack/new/swift/swift/container/server.py", line 486, in __call__
res = method(req)
File "/opt/stack/new/swift/swift/common/utils.py", line 1915, in wrapped
return func(*a, **kw)
File "/opt/stack/new/swift/swift/common/utils.py", line 687, in _timing_stats
resp = func(ctrl, *args, **kwargs)
File "/opt/stack/new/swift/swift/container/server.py", line 464, in POST
broker.update_metadata(metadata)
File "/opt/stack/new/swift/swift/common/db.py", line 677, in update_metadata
conn.commit()
OperationalError: database is locked (txn: tx5065394f288740e69fcec-00528e184e)
Change-Id: I269b133fac53d4792d21b62f801cc0c0ccf337ea