HHH-8579 corrected test case
This commit is contained in:
parent
d3b7b9b717
commit
e356b77df0
|
@ -30,6 +30,7 @@ import org.hibernate.hql.spi.QueryTranslator;
|
||||||
import org.hibernate.hql.spi.QueryTranslatorFactory;
|
import org.hibernate.hql.spi.QueryTranslatorFactory;
|
||||||
import org.hibernate.testing.TestForIssue;
|
import org.hibernate.testing.TestForIssue;
|
||||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||||
|
import org.junit.AfterClass;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -41,6 +42,8 @@ public class LocaleQueryAliasTest extends BaseCoreFunctionalTestCase {
|
||||||
|
|
||||||
private static final String asciiRegex = "^\\p{ASCII}*$";
|
private static final String asciiRegex = "^\\p{ASCII}*$";
|
||||||
|
|
||||||
|
private static Locale currentLocale;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAliasWithLocale() {
|
public void testAliasWithLocale() {
|
||||||
// Without the HHH-8579 fix, this will generate non-ascii query aliases.
|
// Without the HHH-8579 fix, this will generate non-ascii query aliases.
|
||||||
|
@ -57,10 +60,17 @@ public class LocaleQueryAliasTest extends BaseCoreFunctionalTestCase {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() {
|
public static void beforeClass() {
|
||||||
|
currentLocale = Locale.getDefault();
|
||||||
|
|
||||||
// Turkish will generate a "dotless i" when toLowerCase is used on "I".
|
// Turkish will generate a "dotless i" when toLowerCase is used on "I".
|
||||||
Locale.setDefault(Locale.forLanguageTag("tr-TR"));
|
Locale.setDefault(Locale.forLanguageTag("tr-TR"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void afterClass() {
|
||||||
|
Locale.setDefault(currentLocale);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Class<?>[] getAnnotatedClasses() {
|
protected Class<?>[] getAnnotatedClasses() {
|
||||||
return new Class<?>[] { IAmAFoo.class };
|
return new Class<?>[] { IAmAFoo.class };
|
||||||
|
|
Loading…
Reference in New Issue