Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045740Openbravo ERPA. Platformpublic2021-01-18 09:592021-01-18 11:40
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
PR21Q2 
Core
No
0045740: RuntimeModelTest.testIsParent/testisParent2 hides details of wrong defined columns under isDebug
Those test cases show following output when they detect a wrongly defined column:

expected:<0> but was:<1>

Details about which column that is about is not shown at all (unless log4j debug level is enabled).

That makes it very impractical to find and fix the problem.

Instead info from debug output should be directly added to the assertion.
-
Instead info from debug output should be directly added to the assertion to show similar to this:

java.lang.AssertionError: 1 columns set as *isParent* and are *primitive type*: [C_Order - EM_OBGM_c_bpartner_taxid] expected:<0> but was:<1>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:834)
    at org.junit.Assert.assertEquals(Assert.java:645)
    at org.openbravo.test.model.RuntimeModelTest.testIsParent2(RuntimeModelTest.java:296)
    at
No tags attached.
Issue History
2021-01-18 09:59shuehnerNew Issue
2021-01-18 09:59shuehnerAssigned To => shuehner
2021-01-18 09:59shuehnerModules => Core
2021-01-18 09:59shuehnerTriggers an Emergency Pack => No
2021-01-18 10:25hgbotNote Added: 0125489
2021-01-18 11:40hgbotResolutionopen => fixed
2021-01-18 11:40hgbotStatusnew => closed
2021-01-18 11:40hgbotFixed in Version => PR21Q2
2021-01-18 11:40hgbotNote Added: 0125495
2021-01-18 11:40hgbotNote Added: 0125496

Notes
(0125489)
hgbot   
2021-01-18 10:25   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/267 [^]
(0125495)
hgbot   
2021-01-18 11:40   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: ad7f74cabc4bf4a1517b2d4f47124ccc6bd59889
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-01-18T10:20:38+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/ad7f74cabc4bf4a1517b2d4f47124ccc6bd59889 [^]

Fixes ISSUE-45740. Improve test case output for better unterstanding.

Testcase did not show location of the problem in its output but only
behind log4j.isDebug. Move details of the problem directly into the
assert output for immediate feedback to the developer.

---
M src-test/src/org/openbravo/test/model/RuntimeModelTest.java
---
(0125496)
hgbot   
2021-01-18 11:40   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/267 [^]