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.
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.
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/
Updated PR : https://github.com/jbossas/jboss-eap/pull/1738 No Upstream required
Upstream PR : https://github.com/wildfly/wildfly-core/pull/210
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)
PR: https://github.com/jbossas/jboss-eap/pull/2035
Verified on EAP 6.4.0.DR11