[devtools] Avoid db_cache collisions and mis-loading
This is done by stopping to share the db_cache between
TestDataBaseHandler instances
It may seem overkill, but is the only way I could get it to work
properly. I think the whole db caching code needs some rework to better
work with different db handlers.
Closes #4601328
--- a/devtools/__init__.py Mon Oct 06 12:08:41 2014 +0200
+++ b/devtools/__init__.py Wed Nov 19 11:30:18 2014 +0100
@@ -292,6 +292,7 @@
class TestDataBaseHandler(object):
DRIVER = None
+
db_cache = {}
explored_glob = set()
@@ -535,6 +536,10 @@
class PostgresTestDataBaseHandler(TestDataBaseHandler):
DRIVER = 'postgres'
+ # Separate db_cache for PG databases, to avoid collisions with sqlite dbs
+ db_cache = {}
+ explored_glob = set()
+
__CTL = set()
@classmethod