Commit b3f19356 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

erp5_core: use READ-COMMITTED connection only in deleted_catalog table.

parent 5c268d7e
...@@ -797,7 +797,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -797,7 +797,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
len(person_list), len(person_list),
) )
# make some rows in deleted_catalog older. # make some rows in deleted_catalog older.
query = self.portal.erp5_sql_connection().query query = self.portal.erp5_sql_read_committed_connection().query
query('UPDATE deleted_catalog SET deletion_timestamp="%s" LIMIT 5' % \ query('UPDATE deleted_catalog SET deletion_timestamp="%s" LIMIT 5' % \
(DateTime() - 10).strftime('%Y-%m-%d') (DateTime() - 10).strftime('%Y-%m-%d')
) )
...@@ -831,6 +831,8 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -831,6 +831,8 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
uid=person2.getUid(), uid=person2.getUid(),
path=person2.getPath(), path=person2.getPath(),
) )
# commit to start new MariaDB transactions
self.commit()
self.assertEqual( self.assertEqual(
0, 0,
len(self.portal.portal_catalog(uid=person2.getUid())), len(self.portal.portal_catalog(uid=person2.getUid())),
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</item> </item>
<item> <item>
<key> <string>connection_id</string> </key> <key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value> <value> <string>erp5_sql_read_committed_connection</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment