Skip to content

Commit

Permalink
test-concurrency: Lower lock timeout
Browse files Browse the repository at this point in the history
If there's a locking issue in this test, then it's likely not going to
resolve after a few seconds of serializing access. Lower the default 30
second lock timeout to 5 seconds to prevent the test from hanging
unnecessarily.

(cherry picked from commit 055b263)
  • Loading branch information
dbnicholson committed Jun 7, 2021
1 parent 46e74d3 commit 7271863
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test-concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ def mktree(dname, serial=0):
f.write('{} {} {}\n'.format(dname, serial, v))

subprocess.check_call(['ostree', '--repo=repo', 'init', '--mode=bare'])
# like the bit in libtest, but let's do it unconditionally since it's simpler,
# and we don't need xattr coverage for this
with open('repo/config', 'a') as f:
# like the bit in libtest, but let's do it unconditionally since
# it's simpler, and we don't need xattr coverage for this
f.write('disable-xattrs=true\n')

# Make any locking errors fail quickly instead of blocking the test
# for 30 seconds.
f.write('lock-timeout-secs=5\n')

def commit(v):
tdir='tree{}'.format(v)
cmd = ['ostree', '--repo=repo', 'commit', '--fsync=0', '-b', tdir, '--tree=dir='+tdir]
Expand Down

0 comments on commit 7271863

Please sign in to comment.