[tracker] 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] functional-tests: When corrupting database file, also corrupt wal file
- Date: Tue, 28 Jun 2011 09:28:00 +0000 (UTC)
commit 05c4f62895f418f1bf677881bff0dda11c798baf
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 ab679bf..4ef0961 100644
--- a/tests/functional-tests/common/utils/system.py
+++ b/tests/functional-tests/common/utils/system.py
@@ -391,11 +391,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]