summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Nicholson <dbn@endlessos.org>2021-04-19 10:03:57 -0600
committerDan Nicholson <dbn@endlessos.org>2021-06-05 09:15:34 -0600
commit055b263dee7a26ae085527a3a39d96e68e78a512 (patch)
treef61c1cb99de68c141f921e9deadd273939ff82f7 /tests
parent89f4ce2c1d3cacccee8129ac54bd60775dbbe5d2 (diff)
downloadostree-055b263dee7a26ae085527a3a39d96e68e78a512.tar.gz
test-concurrency: Lower lock timeout
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.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test-concurrency.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test-concurrency.py b/tests/test-concurrency.py
index e4ce21e9..3679ddb6 100755
--- a/tests/test-concurrency.py
+++ b/tests/test-concurrency.py
@@ -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]