Commit 466d2004 authored by Vincent Pelletier's avatar Vincent Pelletier

Prevent test_48_ERP5Site_hotReindexAll from executing if connection string is...

Prevent test_48_ERP5Site_hotReindexAll from executing if connection string is the same as the alternative one. This prevents taiting the current catalog for following tests.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25106 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 67166d14
......@@ -1426,6 +1426,18 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
LOG('Testing... ',0,message)
portal = self.getPortal()
self.original_connection_id = 'erp5_sql_connection'
self.new_connection_id = 'erp5_sql_connection2'
new_connection_string = 'test2 test2'
# Skip this test if default connection string is not "test test".
original_connection = getattr(portal, self.original_connection_id)
connection_string = original_connection.connection_string
if (connection_string == new_connection_string):
message = 'SKIPPED: default connection string is the same as the one for hot-reindex catalog'
ZopeTestCase._print(message)
LOG('Testing... ',0,message)
portal_category = self.getCategoryTool()
portal_activities = self.getActivityTool()
self.base_category = portal_category.newContent(portal_type='Base Category',
......@@ -1437,10 +1449,8 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
get_transaction().commit()
self.tic()
# Create new connectors
self.original_connection_id = 'erp5_sql_connection'
self.new_connection_id = 'erp5_sql_connection2'
portal.manage_addZMySQLConnection(self.new_connection_id,'',
'test2 test2')
new_connection_string)
new_connection = portal[self.new_connection_id]
new_connection.manage_open_connection()
# Create new catalog
......
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