Skip to content

wendelin: run wendelin related tests with the site setup by configurator

Xiaowu Zhang requested to merge xiaowu.zhang/erp5:feat/wendelin_test into master

When I add a commit, I usually check all Wendelin/ERP5 tests. However, Wendelin has a random test failure from time to time:

ProgrammingError
(1146, "Table 'erp5_test_2.accounting_transaction' doesn't exist")
Traceback (innermost last):
  Module Products.ERP5Catalog.CatalogTool, line 1002, in uncatalogObjectList
    m.result = self.unindexObject(*m.args, **m.kw)
  Module Products.ERP5Catalog.CatalogTool, line 1017, in unindexObject
    self.uncatalog_object(path=path, uid=uid, sql_catalog_id=sql_catalog_id)
  Module Products.ZSQLCatalog.ZSQLCatalog, line 870, in uncatalog_object
    catalog.uncatalogObject(uid=uid,path=path)
  Module Products.ZSQLCatalog.SQLCatalog, line 1547, in uncatalogObject
    method(uid = uid)
  Module Products.ERP5Type.patches.DA, line 225, in DA__call__
   - <SQL Method at /erp5_portal_30347777537315e139b1afecf8479bcc/portal_catalog/erp5_mysql_innodb/z0_uncatalog_accounting_transaction>
    result=DB__.query(query, self.max_rows_)
  Module Products.ZMySQLDA.db, line 492, in query
    c = self._query(qs)
  Module Products.ZMySQLDA.db, line 435, in _query
    self.db.query(query)
  Module MySQLdb.connections, line 277, in query
    _mysql.connection.query(self, query)
ProgrammingError: (1146, "Table 'erp5_test_2.accounting_transaction' doesn't exist")

Because of this, I have to rerun the tests to make sure my commit does not break anything, which is not efficient.

I am thinking that, since we usually use the configurator to set up a Wendelin instance, it would make sense to run the tests with such an instance as well.

If we change the tests in this way, we should also fix this random test failure.

Thus, I am submitting this MR.

In this MR, I also removed an unnecessary print call.

Merge request reports