runUnitTest: ZODB is removed on '--save', so also recreate the Catalog tables installed by bt5s.
Assuming that the test database already exists and 'movement' table already contains data, on '--save' before this commit: 1. Create a new ERP5 Site: 1. Install erp5_mysql_innodb_catalog. 2. Call ERP5Site_reindexAll(clear_catalog=True) (from ERP5Generator.setupIndex()). => At this point, erp5_mysql_innodb_catalog tables are recreated. 2. Install erp5_movement_table_catalog or any bt5 adding a new SQL table. => This does not recreate the table and leave the existing data as it is. 3. Dump MySQL database to dump.sql. => dump.sql contains 'INSERT INTO' for 'movement' table *before* calling runUnitTest command. This fixes random Unit Tests failures on SQL queries accessing 'movement' table directly and getting {non-existing,past executions} Movements.
Showing
Please register or sign in to comment