[Security][Tests] Azeri(Turkish) locale tripps opensaml dependency

Original commit: elastic/x-pack-elasticsearch@9c4ecabe48
This commit is contained in:
Albert Zaharovits 2018-02-09 13:54:59 +02:00
parent aa12763eba
commit fb8adb4a1c
1 changed files with 3 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public abstract class SamlTestCase extends ESTestCase {
Logger logger = Loggers.getLogger(SamlTestCase.class);
if (isTurkishLocale()) {
// See: https://github.com/elastic/x-pack-elasticsearch/issues/2815
logger.warn("Attempting to run SAML test on turkish locale, but that breaks OpenSAML. Switching to English.");
logger.warn("Attempting to run SAML test on turkish-like locale, but that breaks OpenSAML. Switching to English.");
restoreLocale = Locale.getDefault();
Locale.setDefault(Locale.ENGLISH);
}
@ -45,7 +45,8 @@ public abstract class SamlTestCase extends ESTestCase {
}
private static boolean isTurkishLocale() {
return Locale.getDefault().getLanguage().equals(new Locale("tr").getLanguage());
return Locale.getDefault().getLanguage().equals(new Locale("tr").getLanguage())
|| Locale.getDefault().getLanguage().equals(new Locale("az").getLanguage());
}
@AfterClass