int-dummy-pgsql - Build # 2343 - Fixed:

Check console output at https://ci.openbravo.com/job/int-dummy-pgsql/2343/ to 
view the results.


Committers since last success:

Changes for Build #2342

    David Miguelez <david.migue...@openbravo.com> null
    Related to Issue 38205, 38206. Code Review changes

* Removed new variable and methods in tests API
        
src-test/src/org/openbravo/test/costing/assertclass/CostAdjustmentAssert.java

    David Miguelez <david.migue...@openbravo.com> null
    Related to Issue 38205, 38206. Code Review changes

* Extracted query into different method
* Use proper API for tests assertions
* Added missing brackets in if-else clauses
        
src-test/src/org/openbravo/test/costing/TestCostingNoSourceAdjustments.java
        src-test/src/org/openbravo/test/costing/utils/TestCostingUtils.java
        src/org/openbravo/costing/CostAdjustmentUtils.java

    Armaignac <collazoan...@gmail.com> null
    Fixes issue 38206: Cost Adjustment Process generates too much lines

When adjusting a product used as Raw Material in a Production the same
m_transaction can be added several times in different cost adjustment lines.

Now when exists a non processed cost adjustment line for the same transaccion,
currency, accounting date and source the adjusted amount is added instance of
create a new adjustment line.
        
src-test/src/org/openbravo/test/costing/TestCostingNoSourceAdjustments.java
        
src-test/src/org/openbravo/test/costing/assertclass/CostAdjustmentAssert.java
        src-test/src/org/openbravo/test/costing/utils/TestCostingUtils.java
        src/org/openbravo/costing/CostAdjustmentUtils.java
        src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java

    Armaignac <collazoan...@gmail.com> null
    Related to issue 38205: Cost Adjustment Process very slow

A Cost Adjustment on an environment with 16k transactions and adjusting 11.5k
takes almost 10h to complete.

A refactor was made in order to improve the performance in the Cost Adjustment 
process
 * Removed unnecessary flush
 * Changed ScrollableResults to query
 * Code refactor
        src/org/openbravo/costing/AverageCostAdjustment.java
        src/org/openbravo/costing/CostAdjustmentProcess.java
        src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java

    Armaignac <collazoan...@gmail.com> null
    Fixes issue 38205: Cost Adjustment Process very slow

A Cost Adjustment on an environment with 16k transactions and adjusting 11.5k
takes almost 10h to complete.

This patch does changes in following core files reducing the time to 2.5h:

AverageCostAdjustment:
- Logger using wrong class.
- Remove not needed save() from updated objects.
CostAdjustmentProcess:
- Remove not needed save() from updated objects.
  generateTransactionCosts():
-- Do the flush() only once at the end.
-- Evict the trx object on each iteration as it is not modified. Or instead of 
loading the full trx change to a query retrieving only the required properties.
-- Even better change the method to use a unique insert statement.

CostAdjustementUtils:
- getNewLineNo() method consumes too much time when many lines are added on a 
single adjustment.
-- Change order and get first by a get max(line) -> when there is no index on 
the order column it performs better.
-- Add a new insertCostAdjustmentLine() with a lineNo parameter so it is not 
required to call the getNewLineNo() method.

CostingAlgorithmAdjustmentImp:
- Add new field nextLineNo to store last LineNo used to use new API in 
CostAdjustmentUtils and avoid the query to get the max lineno.
        src/org/openbravo/costing/AverageCostAdjustment.java
        src/org/openbravo/costing/CostAdjustmentProcess.java
        src/org/openbravo/costing/CostAdjustmentUtils.java
        src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java

Changes for Build #2343
No changes




Last 20 lines of the console output:

[...truncated 2633 lines...]
  [ "$(jps | grep Bootstrap || true)" = "" ] && break
  sleep 5
done
[ "$(jps | grep Bootstrap || true)" != "" ] && echo "Tomcat has fail to stop" 
&& exit 1 || true
[ "$i" != "0" ] && secs=$(echo "$i * 5" | bc) && echo "Waiting for $secs secs 
for tomcat to stop"

echo
fi

[int-dummy-pgsql] $ /bin/bash -xe /tmp/hudson4701984524244022010.sh
++ jps
++ grep Bootstrap
++ true
+ '[' '' '!=' '' ']'
POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 0
Email was triggered for: Fixed
Trigger Success was overridden by another trigger and will not send an email.
Sending email for trigger: Fixed
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-builds mailing list
Openbravo-builds@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-builds

Reply via email to