Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045319Openbravo ERPZ. Otherspublic2020-10-28 15:472020-10-30 13:25
shuehner 
alostale 
normalminorhave not tried
closedfixed 
5
 
PR21Q1 
Core
No
0045319: junit test IssuesTest.test18688 is very slow and probably obsolete in the current form
That testcase is technically slow as it does a new hibernate/DAL initialization to register an extra SQL function.

That test case was added when feature to register custom SQL functions to be used via hibernate was added (in issue 18688).

However later in issue 38520 as more generic auto-registering of extra SQL functions to be use in WeldBaseTest was added.

Either test18688 should be moved to register the function on startup as done in 38520. Alternatively it could be removed as the usage of functions added via 38520 is already testing the same functionality making test18688 likely obsolete
    [junit] 12:34:57.996 INFO org.openbravo.test.base.OBBaseTest - *** Starting test case: org.openbravo.test.dal.IssuesTest.test18688
    [junit] 12:34:57.999 INFO org.openbravo.test.base.OBBaseTest - Creating custom DAL layer initialization...
    [junit] 12:34:57.999 INFO org.openbravo.dal.core.DalLayerInitializer - Initializing in-memory model...
    [junit] 12:34:57.999 INFO org.openbravo.base.model.ModelProvider - Building runtime model
    [junit] 12:34:59.309 INFO org.openbravo.dal.core.DalLayerInitializer - Model read in-memory, generating mapping...
    [junit] 12:35:03.543 INFO org.openbravo.base.provider.OBConfigFileProvider - Found provider config file /srv/ci/workspace/try-checks-pgsql/config/provider-config.xml
    [junit] 12:35:03.548 INFO org.openbravo.dal.core.DalLayerInitializer - Dal layer initialized
    [junit] 12:35:03.575 INFO org.openbravo.test.base.OBBaseTest - *** Finished test case: org.openbravo.test.dal.IssuesTest.test18688

Shows the runtime of that single-test case to be quite slow + shows the extra DAL init.
No tags attached.
related to defect 0038520 closed caristu Deprecate OBDal.registerSQLFunction 
related to feature request 00186883.0MP5 closed mtaal Ability to call database functions from HQL query 
Issue History
2020-10-28 15:47shuehnerNew Issue
2020-10-28 15:47shuehnerAssigned To => Triage Finance
2020-10-28 15:47shuehnerModules => Core
2020-10-28 15:47shuehnerTriggers an Emergency Pack => No
2020-10-28 15:50shuehnerRelationship addedrelated to 0038520
2020-10-28 15:50shuehnerRelationship addedrelated to 0018688
2020-10-28 15:56shuehnerAssigned ToTriage Finance => platform
2020-10-29 07:24alostaleAssigned Toplatform => alostale
2020-10-29 07:30hgbotNote Added: 0123990
2020-10-30 13:25hgbotResolutionopen => fixed
2020-10-30 13:25hgbotStatusnew => closed
2020-10-30 13:25hgbotNote Added: 0124066
2020-10-30 13:25hgbotFixed in Version => PR21Q1
2020-10-30 13:25hgbotNote Added: 0124067

Notes
(0123990)
hgbot   
2020-10-29 07:30   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/206 [^]
(0124066)
hgbot   
2020-10-30 13:25   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/206 [^]
(0124067)
hgbot   
2020-10-30 13:25   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: c9a02ff2b3259a206bcc74e238cbdfe872574a69
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2020-10-30T12:25:07+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/c9a02ff2b3259a206bcc74e238cbdfe872574a69 [^]

fixed ISSUE-45319: IssuesTest.test18688 is slow and obsolete

IssuesTest.test18688 is slow to execute (7-8s on top of DAL
initialization).

It is obsolete because funcion registration, which is what it tested,
is already covered in other test cases.

Therefore it is been deleted.

---
M src-test/src/org/openbravo/test/dal/IssuesTest.java
---