Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035088Openbravo ERPA. Platformpublic2017-01-30 17:432017-02-17 07:36
shuehner 
shuehner 
highminorhave not tried
closedfixed 
5
 
3.0PR17Q2 
alostale
Core
No
0035088: Make 2 junit tests more robust against c_country.name being translated directly (not using _trl table)
WebPOS currently cannot c_country translation from c_country_trl table.

That means in some customer project c_country.name values are directly modified in the base table.

2 Junit tests currently assume fixed constant names to find some test-data.

Those should be changed to not rely on unmodified name. For example iso-code 2 letter is another unique column which can be used instead.
Check output of job mod-but-qa modules testing job which has a template or dataset installed doing direct c_country.name edits.
See that 2 platform junit test fail to find their data:
- org.openbravo.test.xml.UniqueConstraintImportTest
- org.openbravo.test.webservice.JSONWebServicesWhereParameter.WebserviceWithWhereParameter

Change both test to search by iso-code and not using directly or indirectly the name field.
No tags attached.
related to defect 0035090 closed shuehner Make junit test TestCosting more robust against c_uom.name being directly modified (and not translated via _trl table) 
diff 35088-part1.diff (1,574) 2017-01-30 17:44
https://issues.openbravo.com/file_download.php?file_id=10357&type=bug
diff 35088-part2.diff (1,707) 2017-01-30 17:51
https://issues.openbravo.com/file_download.php?file_id=10358&type=bug
Issue History
2017-01-30 17:43shuehnerNew Issue
2017-01-30 17:43shuehnerAssigned To => platform
2017-01-30 17:43shuehnerModules => Core
2017-01-30 17:43shuehnerTriggers an Emergency Pack => No
2017-01-30 17:44shuehnerFile Added: 35088-part1.diff
2017-01-30 17:51shuehnerFile Added: 35088-part2.diff
2017-01-30 18:09shuehnerRelationship addedrelated to 0035090
2017-01-30 20:00shuehnerAssigned Toplatform => shuehner
2017-01-30 20:00shuehnerReview Assigned To => alostale
2017-01-30 20:05hgbotCheckin
2017-01-30 20:05hgbotNote Added: 0093948
2017-01-30 20:05hgbotStatusnew => resolved
2017-01-30 20:05hgbotResolutionopen => fixed
2017-01-30 20:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/dbfa5e0628c0b4ae39f6e2fdce9fc01e83f463e2 [^]
2017-02-17 07:36alostaleNote Added: 0094430
2017-02-17 07:36alostaleStatusresolved => closed
2017-02-17 07:36alostaleFixed in Version => 3.0PR17Q2

Notes
(0093948)
hgbot   
2017-01-30 20:05   
Repository: erp/devel/pi
Changeset: dbfa5e0628c0b4ae39f6e2fdce9fc01e83f463e2
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Mon Jan 30 20:04:43 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/dbfa5e0628c0b4ae39f6e2fdce9fc01e83f463e2 [^]

Fixed 35088. Make 2 junit tests more robust.

Both junit tests assigned that the c_country with _id 106 has the name
"Spain". However in some projects that value is directly modified/translated.
Make the test more robust to search for the country via isocode 'ES' which
is more stable. And in the json test verify the expected row via its id 106
instead of its identifier 'Spain'.

---
M src-test/src/org/openbravo/test/webservice/JSONWebServicesWhereParameter.java
M src-test/src/org/openbravo/test/xml/UniqueConstraintImportTest.java
---
(0094430)
alostale   
2017-02-17 07:36   
reviewed