Openbravo Issue Tracking System - Modules
View Issue Details
0048493ModulesDistribution Orderspublic2022-01-27 14:572022-02-01 14:44
alostale 
Triage Omni WMS 
normalminorhave not tried
closedfixed 
5
 
 
0048493: NPE executing tests if OBDOReservationTest is disabled
If OBDOReservationTest is disabled by configuration [1], it fails with a NPE when executing it.

[1] http://wiki.openbravo.com/wiki/How_to_create_JUnit_testcases#Skipping_test_cases [^]
1. Add org.openbravo.warehouse.advancedwarehouseoperations.distributionorders.test.OBDOReservationTest to config/disabled-tests file
2. Run the tests
  -> ERROR:
org.openbravo.base.exception.OBException: java.lang.NullPointerException
    at org.openbravo.warehouse.advancedwarehouseoperations.distributionorders.test.OBDOReservationTest.after(OBDOReservationTest.java:86)
No tags attached.
related to design defect 0045839 new Triage Platform Base Openbravo ERP disabled jUnit tests execute @After method but not @Before 
Issue History
2022-01-27 14:57alostaleNew Issue
2022-01-27 14:57alostaleAssigned To => Triage Finance
2022-01-27 14:57alostaleRelationship addedrelated to 0045839
2022-01-27 15:37hgbotNote Added: 0134619
2022-01-27 15:40martinsdanIssue Monitored: martinsdan
2022-02-01 14:44hgbotNote Added: 0134711
2022-02-01 14:44hgbotResolutionopen => fixed
2022-02-01 14:44hgbotStatusnew => closed
2022-02-01 14:44hgbotNote Added: 0134713
2022-02-01 14:44hgbotNote Added: 0134714

Notes
(0134619)
hgbot   
2022-01-27 15:37   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/-/merge_requests/7 [^]
(0134711)
hgbot   
2022-02-01 14:44   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders [^]
Changeset: 81eea195a4ef5e9f34d9b2af1c171c89c4504fbf
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 27-01-2022 15:30:36
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/-/commit/81eea195a4ef5e9f34d9b2af1c171c89c4504fbf [^]

related to BUG-48493: changes file line terminator from dos to unix

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/distributionorders/test/OBDOReservationTest.java
---
(0134713)
hgbot   
2022-02-01 14:44   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders [^]
Changeset: 2bda4a6c6accbebba0f5cd17b33c4fe733bbbfe3
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 27-01-2022 15:34:16
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/-/commit/2bda4a6c6accbebba0f5cd17b33c4fe733bbbfe3 [^]

fixes BUG-48493: NPE executing tests if OBDOReservationTest is disabled

Because of ISSUE-45839, @AfterClass is executed even if the test is
disabled by configuration. Executing it without having executed the
@Before caused a NPE.

Now even the method is executed in case @Before was not executed, it
does nothing preventing thus the NPE.

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/distributionorders/test/OBDOReservationTest.java
---
(0134714)
hgbot   
2022-02-01 14:44   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/-/merge_requests/7 [^]