Bug 980923 - Can't build EAP 6.1.x with a non US system - tests are not locale independent
Can't build EAP 6.1.x with a non US system - tests are not locale independent
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Testsuite (Show other bugs)
All All
unspecified Severity low
: DR11
: EAP 6.4.0
Assigned To: Emmanuel Hugonnet (ehsavoie)
Petr Kremensky
Depends On: 1003603
  Show dependency treegraph
Reported: 2013-07-03 10:09 EDT by Emmanuel Hugonnet (ehsavoie)
Modified: 2014-12-17 17:19 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFCORE-134 Minor Resolved Make sure CLIWrapper doesn't use default encoding 2015-08-17 22:24:14 EDT
JBoss Issue Tracker WFLY-1650 Major Closed Legacy subsystem testing needs some classloading exclusion mecanism 2015-08-17 22:24:14 EDT

  None (edit)
Description Emmanuel Hugonnet (ehsavoie) 2013-07-03 10:09:45 EDT
Description of problem:
Some unit tests rely on the fact that the default Locale on the plateform should be US. If you're on a non US plateform (French for example) these unit tests will fail.

Steps to Reproduce:
1. Change the locale of the system to French for example
2. Build jboss-eap with maven or with the build.sh script

Actual results:
Unit tests failure

Expected results:
No failure in unit tests as they should be independant from the plateform they are run on.

Additional info:
Tests in error :
 * org.jboss.as.domain.management.security.state.DuplicateUserCheckStateTestCase
 * org.jboss.as.threads.ThreadsSubsystemTestCase
 * org.jboss.as.txn.TransactionSubsystemTestCase
 * org.jboss.as.security.SecurityDomainModelv12UnitTestCase
most of those errors are due when the looger is created with code  like this :

@MessageLogger(projectCode = "JBAS")
public interface TransactionLogger extends BasicLogger {
    TransactionLogger ROOT_LOGGER = Logger.getMessageLogger(TransactionLogger.class, TransactionLogger.class.getPackage().getName());

which relies on the default Locale.
Comment 2 Emmanuel Hugonnet (ehsavoie) 2013-07-04 03:54:13 EDT
In fact this is more a classloading issue than a 'pure' localization issue.
The logging class are generated per language but not all languages are equal in Jboss AS versions.
For French (which was my case) there is no $looger_fr classes in JBoss AS 7.1.2 but they exist in JBoss EAP 6.1.x. Thus when the subsystem is tested for retro-compatibility with Jboss AS 7.1.2  it tries to log messages in French, since the class is not present in the subsytem jar (using a child first classloader) then the class is loaded by the parent but when we are casting it to the generic logger class we are using the generic class loaded by the child classloader and not the one in the parent which creates a ClassCastException.
Comment 8 Pavel Jelinek 2013-10-08 02:56:30 EDT
Tests mentioned above pass, but for EAP 6.2.0 ER4 with fr_FR locale there are still some failing tests:




Comment 10 Emmanuel Hugonnet (ehsavoie) 2014-09-29 13:30:33 EDT
Updated PR : 

No Upstream required
Comment 11 Emmanuel Hugonnet (ehsavoie) 2014-09-30 10:27:19 EDT
Upstream PR : https://github.com/wildfly/wildfly-core/pull/210
Comment 12 Petr Kremensky 2014-10-27 10:27:16 EDT
EAP 6.4.0.DR6:
There are still some failures with French locales:
see https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-6x-as-testsuite-BZ980923-src/1/testReport/

Please ignore fails in LdapCacheInSecurityRealmsTestCase (BZ1155575)
Comment 13 Emmanuel Hugonnet (ehsavoie) 2014-11-21 12:10:00 EST
PR: https://github.com/jbossas/jboss-eap/pull/2035
Comment 14 Petr Kremensky 2014-11-26 05:59:41 EST
Verified on EAP 6.4.0.DR11

Note You need to log in before you can comment on or make changes to this bug.