Commit 6c047bea authored by Nicolas Delaby's avatar Nicolas Delaby

Show that we can not use new catalog structure after

catalog clearing without clearing cache.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36148 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a5ce091b
......@@ -1732,6 +1732,15 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
sql_search_table_list.append('dummy')
sql_search_table_list.sort()
new_catalog.sql_search_tables = tuple(sql_search_table_list)
portal_catalog.manage_catalogClear()
transaction.commit()
# Catalog structure changed, so we should be able to build new queries
# with new table columns
# Check that column map is updated according new structure of catalog.
self.assertTrue('dummy.dummy_title' in portal_catalog.getSQLCatalog().getColumnMap())
# Check more cached methods of SQLCatalog by building SQLQuery
query = portal_catalog.getSQLCatalog().buildQuery(kw={'dummy.dummy_title': 'Foo'})
self.assertTrue(query.query_list)
# prepare arguments for hot reindex
source_sql_connection_id_list=list((self.original_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