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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029274
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementminorhave not tried2015-03-13 15:072015-09-07 11:55
ReportershuehnerView Statuspublic 
Assigned Toaferraz 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision1fc3c80992d5
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029274: New TestCosting junit test is very very slow

DescriptionThat TestCosting junit test is testing the CostingBackground process which is using weld.

Current those junit test do not call the process directly as that is not supported in junit tests (platform team has a bug about that).

This is tracked in issue 28625.

However the current code to work around that is causing severe slowdown of the Costing tests.

Steps To ReproduceSee TestCosting runtime being 17min alone.

Compare to 4-5 min for all other junit tests combined.
Proposed SolutionImprove the workaround code to call background processes via process monitor.

It currently does

1.) trigger process execution
2.) wait always 5s
3.) then loop 30 attemtps of (check finished, wait 1s)

Proposal:
Remove static 5s wait as that it causing most of the 17min runtime.
Reduce the 1s check in loop to 0.25s as most junit tests seems to finish much faster

In theory that should not affect stability at all assuming that the tests are stable before.

As the current code seems to asusme already:
It is waiting for its own process execution and no other concurrent one should happen.

If that assumption is not true both unchanged + modified code are not stable.
TagsNo tags attached.
Attached Filesdiff file icon 29274.diff [^] (3,567 bytes) 2015-03-13 15:08 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
depends on design defect 0028625 closedaferraz QA Process requests should be called directly instead of using a request in TestCosting 
related to defect 0030557 closedaferraz QA Error in TestCosting when it is executed at midnight 

-  Notes
(0075568)
shuehner (administrator)
2015-03-13 15:08

Attached patch does the proposed changes + adds some debugging code to be able to see locally what the process execution runtime vs. waiting time in the junit test is.
(0080073)
hgbot (developer)
2015-09-04 09:28

Repository: erp/devel/pi
Changeset: 1fc3c80992d592df81340979f43711e7b04aec69
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Aug 12 20:50:50 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1fc3c80992d592df81340979f43711e7b04aec69 [^]

Fixes issue 28625 & Fixes issue 29274: Update TestCosting tests

Once dependency injection is supported in junit tests, "Costing Background process" and "Price Correction Background" processes will be directly called in TestCosting tests.
Other requests will also be avoided, calling private methods directly, using Reflection.

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
M src-test/src/org/openbravo/test/AllWebserviceTests.java
M src-test/src/org/openbravo/test/costing/TestCosting.java
M src/org/openbravo/costing/PriceDifferenceBackground.java
---
(0080131)
hudsonbot (developer)
2015-09-04 15:46

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/2c27fe2e93a9 [^]
Maturity status: Test
(0080181)
dmiguelez (developer)
2015-09-07 11:55

Code Review + Testing Ok

- Issue History
Date Modified Username Field Change
2015-03-13 15:07 shuehner New Issue
2015-03-13 15:07 shuehner Assigned To => Sandrahuguet
2015-03-13 15:07 shuehner Modules => Core
2015-03-13 15:07 shuehner Triggers an Emergency Pack => No
2015-03-13 15:08 shuehner File Added: 29274.diff
2015-03-13 15:08 shuehner Note Added: 0075568
2015-03-13 15:15 shuehner Relationship added related to 0028625
2015-03-30 12:26 aferraz Assigned To Sandrahuguet => aferraz
2015-04-14 12:48 Triage Finance Assigned To aferraz => Triage Finance
2015-07-13 18:06 aferraz Assigned To Triage Finance => aferraz
2015-07-13 18:07 aferraz Relationship deleted related to 0028625
2015-07-13 18:07 aferraz Relationship added depends on 0028625
2015-08-12 11:10 aferraz Relationship added related to 0030557
2015-09-04 09:28 hgbot Checkin
2015-09-04 09:28 hgbot Note Added: 0080073
2015-09-04 09:28 hgbot Status new => resolved
2015-09-04 09:28 hgbot Resolution open => fixed
2015-09-04 09:28 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1fc3c80992d592df81340979f43711e7b04aec69 [^]
2015-09-04 15:46 hudsonbot Checkin
2015-09-04 15:46 hudsonbot Note Added: 0080131
2015-09-07 11:55 dmiguelez Review Assigned To => dmiguelez
2015-09-07 11:55 dmiguelez Note Added: 0080181
2015-09-07 11:55 dmiguelez Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker