[Erp5-report] r13530 - /erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 20 23:07:12 CET 2007
Author: seb
Date: Tue Mar 20 23:07:08 2007
New Revision: 13530
URL: http://svn.erp5.org?rev=13530&view=rev
Log:
try to delete object when we are doing hot reindexing and when we are in the double indexing state
Modified:
erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py
Modified: erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py?rev=13530&r1=13529&r2=13530&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py (original)
+++ erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py Tue Mar 20 23:07:08 2007
@@ -1413,6 +1413,7 @@
module = portal.getDefaultModule('Organisation')
self.organisation2 = module.newContent(portal_type='Organisation',
title="GreatTitle2")
+ first_deleted_url = self.organisation2.getRelativeUrl()
get_transaction().commit()
self.tic()
path_list = [self.organisation.getRelativeUrl()]
@@ -1453,6 +1454,11 @@
'InventoryModule_reindexMovementList',
'immediateReindexObject',
'Folder_reindexObjectList',
+ 'unindexObject',
+ 'recursiveImmediateReindexObject'))
+ # try to delete objects in double indexing state
+ module.manage_delObjects(ids=[self.organisation2.getId()])
+ self.playActivityList(('immediateReindexObject',
'unindexObject',
'recursiveImmediateReindexObject',
'playBackRecordedObjectList',
@@ -1473,10 +1479,12 @@
module.manage_delObjects(ids=[self.next_deleted_organisation.getId()])
get_transaction().commit()
self.tic()
+ self.assertEquals(portal_catalog.getHotReindexingState(),
+ HOT_REINDEXING_FINISHED_STATE)
path_list = [self.organisation3.getRelativeUrl()]
self.checkRelativeUrlInSQLPathList(path_list,connection_id=self.new_connection_id)
self.checkRelativeUrlInSQLPathList(path_list,connection_id=self.original_connection_id)
- path_list = [deleted_url,next_deleted_url]
+ path_list = [first_deleted_url,deleted_url,next_deleted_url]
self.checkRelativeUrlNotInSQLPathList(path_list,connection_id=self.new_connection_id)
self.checkRelativeUrlNotInSQLPathList(path_list,connection_id=self.original_connection_id)
@@ -1646,3 +1654,13 @@
self.assertEquals([select_], [x.getObject() for x in
ctool(portal_type='Person', title='SELECT')])
+
+if __name__ == '__main__':
+ framework()
+else:
+ import unittest
+ def test_suite():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(TestERP5Catalog))
+ return suite
+
More information about the Erp5-report
mailing list