Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037648
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2018-01-16 10:322018-02-22 18:19
ReportershuehnerView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR18Q2
StatusclosedFix in branchFixed in SCM revision65a8e7ba6ceb
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037648: junit testcase ViewTest.test14914 is very slow (ca. 15-20seconds)

DescriptionThat test checks that DalUtil.copy (with children) does exclude references which are views (and not tables).

However it repeats that test for every invoice in the system (typically from sampledata).

That seems to have not extra benefit and should be simplified.
Note: As different at least ci test may have different sampledata maybe some simple logic to find 1 case could be useful instead of hardcoded id.

Alternatively moving to a different attached view of i.e. some other non-sampledata table could be an option (Note: initial bug 14914 which fixed DalUtil.copy was about invoices though)


          final Invoice copied = (Invoice) DalUtil.copy(o);
          assertTrue(copied.getFINPaymentSchedInvVList().isEmpty());
Steps To ReproduceCheck runtime of the testcase either in ci or locally:
https://ci.openbravo.com/view/try/job/try-checks-pgsql/lastCompletedBuild/testReport/org.openbravo.test.dal/ViewTest/ [^]
test14914 => 19 sec
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0102296)
hgbot (developer)
2018-02-09 10:34

Repository: erp/devel/pi
Changeset: 65a8e7ba6ceb0e9721f7c3a2cb706d0c586b3ffd
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Feb 09 10:15:25 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/65a8e7ba6ceb0e9721f7c3a2cb706d0c586b3ffd [^]

fixed bug 37648: slow junit ViewTest test cases

  testViews (renamed to viewsCanBeQueried)
    * Queries all the visible records for all views in system loading those records
      in memory. Now, record is limited to just one and we stop querying views once
      one record is retrieved.

  test14914
    * All invoices in the instance were loaded in memory loading for those all their
      payments and making a copy. Now only one invoice is loaded.

---
M src-test/src/org/openbravo/test/dal/ViewTest.java
---
(0102297)
alostale (manager)
2018-02-09 10:36

Comparing times before [1] and after [2] fix:

test14914 14sec -> 50ms
testViews (renamed to viewsCanBeQueried) 190ms -> 26ms


[1] https://ci.openbravo.com/view/try/job/try-checks-pgsql/6532/testReport/org.openbravo.test.dal/ViewTest/ [^]
[2] https://ci.openbravo.com/view/try/job/try-checks-pgsql/6533/testReport/org.openbravo.test.dal/ViewTest/ [^]
(0102330)
hgbot (developer)
2018-02-12 12:39

Repository: erp/devel/pi
Changeset: 83ecad689e9e3a56a2cebece4ad06b5c70a46296
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Feb 12 12:38:32 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/83ecad689e9e3a56a2cebece4ad06b5c70a46296 [^]

related to issue 37648: updated method javadoc

---
M src-test/src/org/openbravo/test/dal/ViewTest.java
---
(0102331)
caristu (developer)
2018-02-12 12:40

Code reviewed + tested OK.
(0102739)
hudsonbot (developer)
2018-02-22 18:19

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/980a6ad5bbf5 [^]
Maturity status: Test
(0102746)
hudsonbot (developer)
2018-02-22 18:19

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/980a6ad5bbf5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2018-01-16 10:32 shuehner New Issue
2018-01-16 10:32 shuehner Assigned To => platform
2018-01-16 10:32 shuehner Modules => Core
2018-01-16 10:32 shuehner Triggers an Emergency Pack => No
2018-02-09 10:17 alostale Assigned To platform => alostale
2018-02-09 10:17 alostale Status new => scheduled
2018-02-09 10:33 alostale Review Assigned To => caristu
2018-02-09 10:34 hgbot Checkin
2018-02-09 10:34 hgbot Note Added: 0102296
2018-02-09 10:34 hgbot Status scheduled => resolved
2018-02-09 10:34 hgbot Resolution open => fixed
2018-02-09 10:34 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/65a8e7ba6ceb0e9721f7c3a2cb706d0c586b3ffd [^]
2018-02-09 10:36 alostale Note Added: 0102297
2018-02-12 12:39 hgbot Checkin
2018-02-12 12:39 hgbot Note Added: 0102330
2018-02-12 12:40 caristu Note Added: 0102331
2018-02-12 12:40 caristu Status resolved => closed
2018-02-12 12:40 caristu Fixed in Version => 3.0PR18Q2
2018-02-22 18:19 hudsonbot Checkin
2018-02-22 18:19 hudsonbot Note Added: 0102739
2018-02-22 18:19 hudsonbot Checkin
2018-02-22 18:19 hudsonbot Note Added: 0102746


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker