Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039276Openbravo ERPA. Platformpublic2018-09-12 15:012018-09-20 13:11
alostale 
alostale 
normaltrivialhave not tried
closedfixed 
5
 
3.0PR18Q4 
caristu
Core
No
0039276: ProcessSchedulingTest fails depending on system locale
Depending on how system's locale is configured, ProcessSchedulingTest.

This issue does not affect production code, only tests. As it trying to create an OBContext instance from a VariablesSecureApp manually initialized without setting a proper language, in this case it defaults to system.
* Execute LANG=C.UTF-8 ant run.test -Dtest=org.openbravo.test.scheduling.ProcessSchedulingTest
  -> ERROR
run.test:
    [junit] 0 [main] INFO org.openbravo.base.weld.test.WeldBaseTest - Creating cdi archive...
    [junit] 396 [main] INFO org.openbravo.base.weld.test.WeldBaseTest - ... cdi archive created
    [junit] 5044 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Initializing in-memory model...
    [junit] 5053 [main] INFO org.openbravo.base.model.ModelProvider - Building runtime model
    [junit] 10831 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Model read in-memory, generating mapping...
    [junit] 24165 [main] INFO org.openbravo.base.provider.OBConfigFileProvider - Found provider config file /opt/OpenbravoERP/config/provider-config.xml
    [junit] 24315 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Dal layer initialized
    [junit] 24411 [main] INFO org.openbravo.test.base.OBBaseTest - *** Starting test case: org.openbravo.test.scheduling.ProcessSchedulingTest.processesShouldInjectBeans
    [junit] 24502 [main] INFO org.openbravo.test.base.OBBaseTest - Creating custom DAL layer initialization...
    [junit] 24506 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Initializing in-memory model...
    [junit] 24508 [main] INFO org.openbravo.base.model.ModelProvider - Building runtime model
    [junit] 26587 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Model read in-memory, generating mapping...
    [junit] 35484 [main] INFO org.openbravo.base.provider.OBConfigFileProvider - Found provider config file /opt/OpenbravoERP/config/provider-config.xml
    [junit] 35493 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Dal layer initialized
    [junit] 35986 [main] ERROR org.openbravo.scheduling.ProcessRunner - Process C559EE4A00F041C99D654C5BF412CD7B threw an Exception: No language found for code en_null
    [junit] java.lang.IllegalArgumentException: No language found for code en_null
    [junit] at org.openbravo.dal.core.OBContext.initialize(OBContext.java:989)
    [junit] at org.openbravo.dal.core.OBContext.setOBContext(OBContext.java:500)
    [junit] at org.openbravo.dal.core.OBContext.setOBContext(OBContext.java:476)
    [junit] at org.openbravo.service.db.DalBaseProcess.execute(DalBaseProcess.java:82)
    [junit] at org.openbravo.scheduling.ProcessRunner.execute(ProcessRunner.java:83)
In case VariablesSecureApp is initialized without setting a language, default it to en_US rather than relying on system settings.
No tags attached.
Issue History
2018-09-12 15:01alostaleNew Issue
2018-09-12 15:01alostaleAssigned To => alostale
2018-09-12 15:01alostaleModules => Core
2018-09-12 15:01alostaleTriggers an Emergency Pack => No
2018-09-12 15:02alostaleReview Assigned To => caristu
2018-09-12 15:03hgbotCheckin
2018-09-12 15:03hgbotNote Added: 0106706
2018-09-12 15:03hgbotStatusnew => resolved
2018-09-12 15:03hgbotResolutionopen => fixed
2018-09-12 15:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bfd9f58405fa333a197ea65a2d518e3b0382a132 [^]
2018-09-12 21:33hudsonbotCheckin
2018-09-12 21:33hudsonbotNote Added: 0106736
2018-09-20 13:11caristuNote Added: 0106878
2018-09-20 13:11caristuStatusresolved => closed
2018-09-20 13:11caristuFixed in Version => 3.0PR18Q4

Notes
(0106706)
hgbot   
2018-09-12 15:03   
Repository: erp/devel/pi
Changeset: bfd9f58405fa333a197ea65a2d518e3b0382a132
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Sep 12 15:02:46 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bfd9f58405fa333a197ea65a2d518e3b0382a132 [^]

fixed issue 39276: ProcessSchedulingTest fails depending on system locale

  In case VariablesSecureApp is initialized without setting a language, default
  it to en_US rather than relying on system settings.

---
M src/org/openbravo/base/secureApp/VariablesSecureApp.java
---
(0106736)
hudsonbot   
2018-09-12 21:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ad75d3cb1744 [^]
Maturity status: Test
(0106878)
caristu   
2018-09-20 13:11   
Code reviewed + tested OK.