Commit 1b3f282a authored by Jérome Perrin's avatar Jérome Perrin

Tests that ERP5Catalog uses a deferred connection for full text indexing.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10737 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1395bdf3
......@@ -993,3 +993,21 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
portal_type='Organisation',
title={'query': ('B', 'C'), 'range': 'minngt'})])
def test_DeferredConnection(self, quiet=quiet, run=run_all_test):
"""ERP5Catalog uses a deferred connection for full text indexing.
"""
if not run: return
erp5_sql_deferred_connection = getattr(self.getPortal(),
'erp5_sql_deferred_connection',
None)
self.failUnless(erp5_sql_deferred_connection is not None)
self.assertEquals('Z MySQL Deferred Database Connection',
erp5_sql_deferred_connection.meta_type)
for method in ['z0_drop_fulltext',
'z0_uncatalog_fulltext',
'z_catalog_fulltext_list',
'z_create_fulltext', ]:
self.assertEquals('erp5_sql_deferred_connection',
getattr(self.getCatalogTool().getSQLCatalog(),
method).connection_id)
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