Bug 980923 - Can't build EAP 6.1.x with a non US system - tests are not locale independent
Summary: Can't build EAP 6.1.x with a non US system - tests are not locale independent
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Testsuite
Version: 6.1.1
Hardware: All
OS: All
unspecified
low
Target Milestone: DR11
: EAP 6.4.0
Assignee: Emmanuel Hugonnet (ehsavoie)
QA Contact: Petr Kremensky
URL: https://issues.jboss.org/browse/WFLY-...
Whiteboard:
Depends On: 1003603
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-03 14:09 UTC by Emmanuel Hugonnet (ehsavoie)
Modified: 2019-08-19 12:44 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1125944 0 unspecified CLOSED (6.4.z) Issues with CalendarBasedTimeoutTestCase 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker WFCORE-134 0 Minor Resolved Make sure CLIWrapper doesn't use default encoding 2015-08-18 02:24:14 UTC
Red Hat Issue Tracker WFLY-1650 0 Major Closed Legacy subsystem testing needs some classloading exclusion mecanism 2015-08-18 02:24:14 UTC

Internal Links: 1125944

Description Emmanuel Hugonnet (ehsavoie) 2013-07-03 14:09:45 UTC
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 07:54:13 UTC
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 06:56:30 UTC
Tests mentioned above pass, but for EAP 6.2.0 ER4 with fr_FR locale there are still some failing tests:

org.jboss.as.jpa.subsystem.JPA11SubsystemTestCase.testTransformers7_1_2 	
org.jboss.as.jpa.subsystem.JPA11SubsystemTestCase.testTransformersRejectExpressions7_1_2
org.jboss.as.modcluster.ModClusterSubsystemTestCase.testTransformers712 	
org.jboss.as.modcluster.ModClusterSubsystemTestCase.testExpressionsAreRejected712 
org.jboss.as.osgi.parser.OSGiSubsystemTestCase.testTransformerAS712 
org.jboss.as.osgi.parser.OSGiSubsystemTestCase.testRejectExpressionsAS712 

See: 

https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-60-as-testsuite-RHEL-matrix-OracleJDK6-french-pjelinek/1/testReport/

https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-60-as-testsuite-RHEL-matrix-openJDK7-french-pjelinek/1/testReport/

Comment 10 Emmanuel Hugonnet (ehsavoie) 2014-09-29 17:30:33 UTC
Updated PR : 
https://github.com/jbossas/jboss-eap/pull/1738

No Upstream required

Comment 11 Emmanuel Hugonnet (ehsavoie) 2014-09-30 14:27:19 UTC
Upstream PR : https://github.com/wildfly/wildfly-core/pull/210

Comment 12 Petr Kremensky 2014-10-27 14:27:16 UTC
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/
org.jboss.as.test.integration.ejb.timerservice.mgmt.NonPersistentCalendarTimerManagementTestCase
org.jboss.as.test.integration.ejb.timerservice.mgmt.PersistentCalendarTimerManagementTestCase
org.jboss.as.test.integration.ejb.timerservice.mgmt.TimerManagementTestCase

Please ignore fails in LdapCacheInSecurityRealmsTestCase (BZ1155575)

Comment 13 Emmanuel Hugonnet (ehsavoie) 2014-11-21 17:10:00 UTC
PR: https://github.com/jbossas/jboss-eap/pull/2035

Comment 14 Petr Kremensky 2014-11-26 10:59:41 UTC
Verified on EAP 6.4.0.DR11


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