[tracker/checkpoint: 5/16] functional-tests: When corrupting database file, also corrupt wal file
- From: JÃrg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/checkpoint: 5/16] functional-tests: When corrupting database file, also corrupt wal file
- Date: Tue, 28 Jun 2011 09:36:18 +0000 (UTC)
commit d0538d1a50ba2f935b5e2d6e9f9f1e8ed74ec19c
Author: JÃrg Billeter <j bitron ch>
Date: Fri Jun 24 15:45:21 2011 +0200
functional-tests: When corrupting database file, also corrupt wal file
In some circumstances, the database file will be silently fixed with the
wal file. This needs to be prevented in the tests.
tests/functional-tests/common/utils/system.py | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/tests/functional-tests/common/utils/system.py b/tests/functional-tests/common/utils/system.py
index 0486f86..3bbceed 100644
--- a/tests/functional-tests/common/utils/system.py
+++ b/tests/functional-tests/common/utils/system.py
@@ -388,11 +388,12 @@ class TrackerSystemAbstraction:
f.close ()
def tracker_store_corrupt_dbs (self):
- db_path = os.path.join (TEST_ENV_DIRS ['XDG_CACHE_HOME'], "tracker", "meta.db")
- f = open (db_path, "w")
- for i in range (0, 100):
- f.write ("Some stupid content... hohohoho, not a sqlite file anymore!\n")
- f.close ()
+ for filename in ["meta.db", "meta.db-wal"]:
+ db_path = os.path.join (TEST_ENV_DIRS ['XDG_CACHE_HOME'], "tracker", filename)
+ f = open (db_path, "w")
+ for i in range (0, 100):
+ f.write ("Some stupid content... hohohoho, not a sqlite file anymore!\n")
+ f.close ()
def tracker_store_remove_journal (self):
db_location = os.path.join (TEST_ENV_DIRS ['XDG_DATA_HOME'], "tracker", "data")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]