summaryrefslogtreecommitdiff
path: root/common/src/leap/soledad
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2016-01-21 11:44:27 +0100
committerVictor Shyba <victor.shyba@gmail.com>2016-01-21 17:58:41 -0300
commit916eaecea19f611106c2b4cea1140025c9f87ba3 (patch)
tree2155c60bff892f26234918b3359e77aa07bfd884 /common/src/leap/soledad
parent4c214b7ff9351dd98efbb033dd5e09b8ff9ff763 (diff)
[Fix] fix concurrency problem in test_sync_deferred
- Use dbsyncer (SQLCipherU1DBSync) instead of SQLCipherDatabase as only the first one supports multiple threads while syncing and is actually used by Soledad.sync
Diffstat (limited to 'common/src/leap/soledad')
-rw-r--r--common/src/leap/soledad/common/tests/test_sync_deferred.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/src/leap/soledad/common/tests/test_sync_deferred.py b/common/src/leap/soledad/common/tests/test_sync_deferred.py
index 90b00670..c62bd156 100644
--- a/common/src/leap/soledad/common/tests/test_sync_deferred.py
+++ b/common/src/leap/soledad/common/tests/test_sync_deferred.py
@@ -148,6 +148,8 @@ class TestSoledadDbSyncDeferredEncDecr(
replica_uid = self._soledad._dbpool.replica_uid
sync_db = self._soledad._sync_db
sync_enc_pool = self._soledad._sync_enc_pool
+ dbsyncer = self._soledad._dbsyncer # Soledad.sync uses the dbsyncer
+
target = soledad_sync_target(
self, self.db2._dbname,
source_replica_uid=replica_uid,
@@ -155,7 +157,7 @@ class TestSoledadDbSyncDeferredEncDecr(
sync_enc_pool=sync_enc_pool)
self.addCleanup(target.close)
return sync.SoledadSynchronizer(
- self.db1,
+ dbsyncer,
target).sync(defer_decryption=True)
def wait_for_sync(self):