[tracker/checkpoint] 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] functional-tests: When corrupting database file, also corrupt wal file
- Date: Fri, 24 Jun 2011 14:13:30 +0000 (UTC)
commit 3794b746014fd6dd3395ee237f4eed285fee63f3
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]