[tracker/checkpoint: 3/12] 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: 3/12] functional-tests: When corrupting database file, also corrupt wal file
- Date: Mon, 27 Jun 2011 08:33:13 +0000 (UTC)
commit ea5bb6f42e4cf37e42125050691fc6b669904661
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]