]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- turned twophase=True on in test
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 17 Aug 2007 18:14:11 +0000 (18:14 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 17 Aug 2007 18:14:11 +0000 (18:14 +0000)
- TLEngine raises notimplemented for two-phase

lib/sqlalchemy/engine/threadlocal.py
test/orm/session.py

index 164c50f517357c49c6623307d56a41a603b1b71b..62f402be5c6e0ececc599e0d10f01c8b61e1cafa 100644 (file)
@@ -39,6 +39,9 @@ class TLSession(object):
                 self.reset()
 
     def begin_twophase(self, xid=None):
+        raise NotImplementedError("Two phase transactions not yet implemented for 'threadlocal' strategy")
+    
+    def _dont_begin_twophase(self, xid=None):    
         if self.__tcount == 0:
             self.__transaction = self.get_connection()
             self.__trans = self.__transaction._begin_twophase(xid=xid)
index 381b54d5517215a4044debbaf89528b550bb38e3..5cf56ac4ad208ddc9943e5a0b3c01932ef0a9499 100644 (file)
@@ -250,7 +250,7 @@ class SessionTest(AssertMixin):
         mapper(Address, addresses)
         
         engine2 = create_engine(testbase.db.url)
-        sess = create_session(transactional=False, autoflush=False, twophase=False)
+        sess = create_session(transactional=False, autoflush=False, twophase=True)
         sess.bind_mapper(User, testbase.db)
         sess.bind_mapper(Address, engine2)
         sess.begin()