From a052c150ae1276f643e3b6e049e45571fe1a7b70 Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 19 Apr 2017 10:43:59 +0200 Subject: [test] tune parameters for asynchronous sqlcipher access When hundreds of concurrent document creations are spawned during tests, test runs in slower machines may fail with "db is locked" error. Increasing the timeout and number of retries in the sqlcipher adbapi level may help avoiding that. --- client/src/leap/soledad/client/adbapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/leap/soledad/client/adbapi.py b/client/src/leap/soledad/client/adbapi.py index 2bc146bd..a60970c0 100644 --- a/client/src/leap/soledad/client/adbapi.py +++ b/client/src/leap/soledad/client/adbapi.py @@ -45,12 +45,12 @@ logger = getLogger(__name__) How long the SQLCipher connection should wait for the lock to go away until raising an exception. """ -SQLCIPHER_CONNECTION_TIMEOUT = 5 +SQLCIPHER_CONNECTION_TIMEOUT = 10 """ How many times a SQLCipher query should be retried in case of timeout. """ -SQLCIPHER_MAX_RETRIES = 10 +SQLCIPHER_MAX_RETRIES = 20 def getConnectionPool(opts, openfun=None, driver="pysqlcipher"): -- cgit v1.2.3