]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
skip deadlocking test_two_phase_recover on mysql+zxjdbc, ensure cursors are
authorPhilip Jenvey <pjenvey@underboss.org>
Thu, 16 Jul 2009 23:02:00 +0000 (23:02 +0000)
committerPhilip Jenvey <pjenvey@underboss.org>
Thu, 16 Jul 2009 23:02:00 +0000 (23:02 +0000)
closed

test/engine/test_transaction.py

index 9d562cdb353f70f18b31661b673ae298eae37caa..87229cf047cae82107ac5ab34368f9ba99f18f97 100644 (file)
@@ -274,6 +274,8 @@ class TransactionTest(TestBase):
         connection.close()
 
     @testing.requires.two_phase_transactions
+    @testing.skip_if(lambda: testing.against('mysql+zxjdbc'),
+                     'Deadlocks, causing subsequent tests to fail')
     @testing.fails_on('mysql', 'FIXME: unknown')
     def test_two_phase_recover(self):
         # MySQL recovery doesn't currently seem to work correctly
@@ -726,7 +728,7 @@ class ForUpdateTest(TestBase):
         for i in xrange(count):
             trans = con.begin()
             try:
-                existing = con.execute(sel).fetchone()
+                existing = con.execute(sel).first()
                 incr = existing['counter_value'] + 1
 
                 time.sleep(delay)
@@ -734,7 +736,7 @@ class ForUpdateTest(TestBase):
                                             values={'counter_value':incr}))
                 time.sleep(delay)
 
-                readback = con.execute(sel).fetchone()
+                readback = con.execute(sel).first()
                 if (readback['counter_value'] != incr):
                     raise AssertionError("Got %s post-update, expected %s" %
                                          (readback['counter_value'], incr))
@@ -778,7 +780,7 @@ class ForUpdateTest(TestBase):
         self.assert_(len(errors) == 0)
 
         sel = counters.select(whereclause=counters.c.counter_id==1)
-        final = db.execute(sel).fetchone()
+        final = db.execute(sel).first()
         self.assert_(final['counter_value'] == iterations * thread_count)
 
     def overlap(self, ids, errors, update_style):