diff options
author | drebs <drebs@leap.se> | 2013-12-15 14:40:48 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-12-18 14:36:59 -0200 |
commit | 69c9e8776b3c30af74440482b8d1e37945e0d2b3 (patch) | |
tree | db5aec39baa9c59e546fc79b6f7c99dd05dcfe2e /common | |
parent | 42b02476ff70326e2d52fa70a94f1f7035cb185a (diff) |
Add changes file.
Diffstat (limited to 'common')
-rw-r--r-- | common/changes/bug_4475_remodel-couch-backend | 2 | ||||
-rw-r--r-- | common/src/leap/soledad/common/tests/test_couch.py | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/common/changes/bug_4475_remodel-couch-backend b/common/changes/bug_4475_remodel-couch-backend new file mode 100644 index 00000000..13a1b121 --- /dev/null +++ b/common/changes/bug_4475_remodel-couch-backend @@ -0,0 +1,2 @@ + o Remodel couch backend to fix concurrency and scalability. Closes #4475, + #4682, #4683 and #4680. diff --git a/common/src/leap/soledad/common/tests/test_couch.py b/common/src/leap/soledad/common/tests/test_couch.py index 48b3585f..72346333 100644 --- a/common/src/leap/soledad/common/tests/test_couch.py +++ b/common/src/leap/soledad/common/tests/test_couch.py @@ -223,8 +223,22 @@ class CouchTests(test_backends.AllDatabaseTests, CouchDBTestCase): scenarios = COUCH_SCENARIOS + def setUp(self): + test_backends.AllDatabaseTests.setUp(self) + # save db info because of test_close + self._server = self.db._server + self._dbname = self.db._dbname + def tearDown(self): - self.db.delete_database() + # if current test is `test_close` we have to use saved objects to + # delete the database because the close() method will have removed the + # references needed to do it using the CouchDatabase. + if self.id() == \ + 'leap.soledad.common.tests.test_couch.CouchTests.' \ + 'test_close(couch)': + del(self._server[self._dbname]) + else: + self.db.delete_database() test_backends.AllDatabaseTests.tearDown(self) |