Skip to content
Permalink
Browse files
fix encoding issue with the TCK the hardcore way...
nail it do EN
  • Loading branch information
struberg authored and mbenson committed Oct 16, 2018
1 parent c24e3be commit 8cd26a8d86107ec40882c8192addd176883c9855
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
@@ -173,10 +173,6 @@ under the License.
<suiteXmlFiles>
<suiteXmlFile>${basedir}/src/test/beanvalidation-tck-tests-suite.xml</suiteXmlFile>
</suiteXmlFiles>
<environmentVariables>
<!-- force english locale and UTF8 because the TCK checks the messages -->
<LANG>en_EN.UTF-8</LANG>
</environmentVariables>
<systemProperties>
<property>
<name>validation.provider</name>
@@ -26,9 +26,15 @@
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.Hashtable;
import java.util.Locale;

// mock a context to satisfy lookups
public class BValJndiFactory implements InitialContextFactory {
public BValJndiFactory() {
// this is an ugly hack, but the TCK expects us to get english validation messages :(
Locale.setDefault(Locale.ENGLISH);
}

public Context getInitialContext(final Hashtable<?, ?> environment) throws NamingException {
return Context.class.cast(Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
new Class<?>[] { Context.class }, new InvocationHandler() {
@@ -21,8 +21,8 @@ think to add -Dvalidation.provider=org.apache.bval.jsr.ApacheValidationProvider
<suite name="tmp" verbose="1">
<test name="tmp">
<classes>
<!-- <class name="org.hibernate.beanvalidation.tck.tests.xmlconfiguration.groupconversion.containerelement.XmlBasedContainerElementGroupConversionValidationTest"/> -->
<class name="org.hibernate.beanvalidation.tck.tests.bootstrap.BootstrapConfigurationTest"/>
<class name="org.hibernate.beanvalidation.tck.tests.xmlconfiguration.constraintdeclaration.containerelementlevel.ContainerElementTypeConstraintsForParameterXmlMappingTest"/>
<!-- <class name="org.hibernate.beanvalidation.tck.tests.bootstrap.BootstrapConfigurationTest"/>-->
<!--
<class name="org.hibernate.beanvalidation.tck.tests.util.ConstraintViolationAssertTest"/>
-->

0 comments on commit 8cd26a8

Please sign in to comment.