[test] workaround connection leak making tests fail under windows environment (though we've still probably some open connection leak to resolve...)
--- a/devtools/testlib.py Thu Jun 17 16:17:09 2010 +0200
+++ b/devtools/testlib.py Thu Jun 17 16:24:01 2010 +0200
@@ -218,7 +218,10 @@
if not 'repo' in cls.__dict__:
cls._build_repo()
else:
- cls.cnx.rollback()
+ try:
+ cls.cnx.rollback()
+ except:
+ pass
cls._refresh_repo()
@classmethod
@@ -280,6 +283,7 @@
MAILBOX[:] = [] # reset mailbox
def tearDown(self):
+ self.cnx.rollback()
for cnx in self._cnxs:
if not cnx._closed:
cnx.close()