Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023607Openbravo ERPA. Platformpublic2013-04-22 15:042013-04-29 18:11
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0MP23 
AugustoMauch
Core
No
0023607: deleteClient junit test is slower then needed - part1
That test does delete a client and has extra verification to ensure that all foreign keys are re-enabled correctly after the deleteClient operation. For this it does load the complete db-model before and after running deleteClient.

However for the verification of foreign keys only the tables part of the model loading is needed, the rest can be skipped.

As that rest at least on postgres is a very heavy operation (i.e. because of the function- & trigger-standardization) not doing that extra part will lead to a substantial speedup of the testcase.
run the testDeleteClient testcase from the ClientExportImport test
It can be seen that it takes quick a long time (around 5minutes)

Check the code in the testDeleteClient method doing the 2* loadModelFromDatabase and observe that it does not use the complete model but only the list of fk-constraints attached to the tables of the model.
No tags attached.
Issue History
2013-04-22 15:04shuehnerNew Issue
2013-04-22 15:04shuehnerAssigned To => shuehner
2013-04-22 15:04shuehnerModules => Core
2013-04-22 15:04shuehnerTriggers an Emergency Pack => No
2013-04-22 15:06hgbotCheckin
2013-04-22 15:06hgbotNote Added: 0058090
2013-04-22 15:06hgbotStatusnew => resolved
2013-04-22 15:06hgbotResolutionopen => fixed
2013-04-22 15:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8a81298c4d0d5fac04484c357efc39804f7ba1f6 [^]
2013-04-22 15:07shuehnerReview Assigned To => AugustoMauch
2013-04-23 21:03hudsonbotCheckin
2013-04-23 21:03hudsonbotNote Added: 0058154
2013-04-29 18:11AugustoMauchNote Added: 0058309
2013-04-29 18:11AugustoMauchStatusresolved => closed
2013-04-29 18:11AugustoMauchFixed in Version => 3.0MP23

Notes
(0058090)
hgbot   
2013-04-22 15:06   
Repository: erp/devel/pi
Changeset: 8a81298c4d0d5fac04484c357efc39804f7ba1f6
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Mon Apr 22 15:06:18 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8a81298c4d0d5fac04484c357efc39804f7ba1f6 [^]

Fixed 23607: speedup junit test: deleteClient
Only load tables part of dbsm model as only that part is needed by the test.

---
M src-test/org/openbravo/test/xml/ClientExportImportTest.java
---
(0058154)
hudsonbot   
2013-04-23 21:03   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f6ee8c2944a0 [^]

Maturity status: Test
(0058309)
AugustoMauch   
2013-04-29 18:11   
Code reviewed and verified in pi@5e5dd4a8b5c0