Openbravo Issue Tracking System - Retail Modules
View Issue Details
0049111Retail ModulesDiscounts and Promotionspublic2022-04-22 11:252022-05-10 09:45
cberner 
cberner 
normalminorhave not tried
closedfixed 
5
 
RR22Q3 
No
0049111: Discounts tests with node server fail due to usage of Dal
Dal is being used in several tests on Discounts module. This results in them failing when tested in Remote mode, with the node server deployed. That is due to Dal not being initialized on all tests, it is only initialized once at the start for deploying the JS and then it is assumed not required by the testing infrastructure, that is not the case anymore, as Dal is being used in several tests.
Follow the guide provided here: http://wiki.openbravo.com/wiki/How_to_run_Discounts_Test_Cases#Running_the_test_cases [^]

Run the tests in Remote mode and check that all tests fail after the first test-case, due to Dal being uninitialized. If rerun with the node service not restarted, all tests will fail, as dal is not initialized.
Initialize Dal always at the start of the suite of tests.
No tags attached.
Issue History
2022-04-22 11:25cbernerNew Issue
2022-04-22 11:25cbernerAssigned To => Retail
2022-04-22 11:25cbernerTriggers an Emergency Pack => No
2022-04-22 11:25cbernerAssigned ToRetail => cberner
2022-04-22 11:25cbernerStatusnew => acknowledged
2022-04-22 11:28hgbotNote Added: 0136676
2022-05-10 09:45hgbotResolutionopen => fixed
2022-05-10 09:45hgbotStatusacknowledged => closed
2022-05-10 09:45hgbotNote Added: 0137109
2022-05-10 09:45hgbotFixed in Version => RR22Q3
2022-05-10 09:45hgbotNote Added: 0137110

Notes
(0136676)
hgbot   
2022-04-22 11:28   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/54 [^]
(0137109)
hgbot   
2022-05-10 09:45   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/54 [^]
(0137110)
hgbot   
2022-05-10 09:45   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: e05c5b78c13021016e479ef7318d3d500b0cf026
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 22-04-2022 11:38:57
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/e05c5b78c13021016e479ef7318d3d500b0cf026 [^]

Fixes ISSUE-49111: Discounts tests with node server fail due to usage of not initialized DAL layer

New discounts tests use DAL layer, and as such they require it to be
initialized. Due to previously not requiring it, the dal layer was
closed after the .js was deployed when running the tests in Remote mode
with a node service. Because it is required now to have DAL available,
it is always initialized, which is a little performance hit when running
tests that don't require it.

---
M src-test/org/openbravo/retail/discounts/test/base/DiscountsBaseTest.java
---