Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0050186Openbravo ERPA. Platformpublic2022-09-07 11:102022-09-27 07:58
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
PR22Q4 
Core
No
0050186: junit test DataSourceSecuritytest is quite slow because of repeated changeProfile calls
This junit test does a single login and then runs several tests for various roles.

Before each individual (parametrized) test it calls changeProfile which essentially calls the UserInfoWidgetActionHandler in the backend.

Those repeated calls sum up to half of the total runtime of this test.

Skipping the call in case of not having any actual change in role removes most of the overhead.
Check time spent in changeProfile call compared to per-test call.
Save last values (role,org,lang,warehouse) inside the call and skip switching in case all parameters are the same last time
No tags attached.
Issue History
2022-09-07 11:10shuehnerNew Issue
2022-09-07 11:10shuehnerAssigned To => shuehner
2022-09-07 11:10shuehnerModules => Core
2022-09-07 11:10shuehnerTriggers an Emergency Pack => No
2022-09-07 11:13hgbotNote Added: 0140784
2022-09-27 07:58hgbotResolutionopen => fixed
2022-09-27 07:58hgbotStatusnew => closed
2022-09-27 07:58hgbotNote Added: 0141386
2022-09-27 07:58hgbotFixed in Version => PR22Q4
2022-09-27 07:58hgbotNote Added: 0141387

Notes
(0140784)
hgbot   
2022-09-07 11:13   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/702 [^]
(0141386)
hgbot   
2022-09-27 07:58   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/702 [^]
(0141387)
hgbot   
2022-09-27 07:58   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: cdbbdcfee81527186748c4d2cbeb33f256520d83
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 27-09-2022 07:57:24
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/cdbbdcfee81527186748c4d2cbeb33f256520d83 [^]

Fixes ISSUE-50186. Speedup DataSourceSecurity test.

This test issues a bigger number of changeProfile calls (one per
parametrized test).
Optimize away the backend http call in case the requested params are the
same as used last time.

---
M src-test/src/org/openbravo/test/datasource/BaseDataSourceTestDal.java
---